[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xml:output indent="yes" wins over xsl:preserve-space/
I have an XSLT 2.0 script that I'm using to generate output with Saxon 8B, and I want confirmation that the behavior I'm getting is the expected one. It's not the behavior I want, but if it follows the specs then I can't complain. My script simply extracts all tables in an XML document and writes them to a result document. In the source document, rows and cells are not indented; I want them to be indented in the result document. However, because cells can contain mixed content, I want space to be preserved inside them. This does not work: <xsl:output method="xml" indent="yes"/> <xsl:preserve-space elements="cell"/> because it leads to output such as <cell> <i>some text</i> </cell> The same output occurs if I use <xsl:strip-space> in place of xsl:preserve-space. It seems, then, that xsl:output overrides xsl:strip-space or xsl:preserve-space. I can produce the output I want by adding "xml:space='preserve'" as an attribute on all <cell> elements in the source. Is modifying the source the only option I have? DS -- David Sewell, Editorial and Technical Manager Electronic Imprint, The University of Virginia Press PO Box 400318, Charlottesville, VA 22904-4318 USA Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903 Email: dsewell@xxxxxxxxxxxx Tel: +1 434 924 9973 Web: http://www.ei.virginia.edu/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|