Subject: RE: [xsl] Newline problems From: "Vishwajit Pantvaidya" <pantvaidya@xxxxxxxxxxx> Date: Thu, 01 May 2003 17:10:46 -0700 |
<!DOCTYPE ABC [ ... ]><ABC> ... <info> <attr> <name> ponumber</name> <atomicValue> 12345</atomicValue> </attr> ... </info> ... </ABC>
From: "Lars Huttar" <lars_huttar@xxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: [xsl] Newline problems Date: Thu, 1 May 2003 17:24:44 -0500
It's hard to tell, without seeing the part of your stylesheet that deals with <attr>. Where is it that you're expecting output but not getting it?
It looks like the <ABC> element should match the first (partial) template you showed from your stylesheet, unless your XML source uses namespaces that you haven't mentioned; and therefore should output a <!DOCTYPE ...> declaration. (By the way, have you considered using <xsl:output doctype-public="..." doctype-system="..." /> ?)
Lars
> I am using xalan for xml to xml transformation. Input xml string > has some DOS carriage return and/or line feeds introduced by > the source > application. The source xml string that I was trying to > transform is like > (exactly as is, including newlines) > > <!DOCTYPE ABC [ > ... > ]><ABC> > ... > <attr> > value</attr> > ... > </ABC> > > i.e. the newline was probably getting included in the value > of the element > "attr". Would such newlines yield the empty output xml I was getting? > Xsl-strip space did not help. Finally, I had to write java > code to strip the > newlines from the source xml and then I started getting output xml > correctly. > > Our xsl is like > > <?xml version = "1.0" encoding = "UTF-8"?> > <xsl:transform xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" > version = "1.0"> > <xsl:template match = "ABC"> > <xsl:text disable-output-escaping="yes"><!DOCTYPE > OrderProcessing></xsl:text> > ... > <xsl:template mode = "Attribs" match = "ctrInfo"> > <xsl:element name="ADDR"> > <xsl:value-of > select="attribute/atomicValue[../name='ADDR']"/> > </xsl:element> > > > Please help...
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Newline problems, Michael Kay | Thread | RE: [xsl] Newline problems, Lars Huttar |
Re: [xsl] Newline problems, Vishwajit Pantvaidya | Date | Re: [xsl] Newline problems, Mike Brown |
Month |