xsl-list
[Top] [All Lists]

RE: Creating nested output from <xsl:if>'s

2004-12-04 09:26:28
I was using <xsl:text> because it seemed to give for better 
formatting using 
xsltproc. Is there a better way?
This method works fine. Thanks

If you're taking responsibility for serializing the XML then you've got your
work cut out. In particular you need to make sure that all special
characters such as < and & (and quotes within attributes) are properly
escaped. You also have to get all the namespaces right. It's far better to
leave this job to the XSLT processor.

There's another reason for this, which is that your code becomes more
reusable. Once you've serialized the output, you can't do anything further
with it except by re-parsing it.

If you need more control over formatting than xsl:output gives you, then I
worry about the design of the applications that are consuming this XML.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--