Subject: cdata was: XSL and HTML From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 14 Jan 1999 15:41:04 GMT |
> <xsl:cdata> tag, there is an obvious need for this What would <xsl:cdata> mean? This is a real question, as I don't currently see what it could mean (despite the fact that you mention it is implemented in some systems:-). My understanding is that the XSL stylesheet is itself parsed as an XML document, and takes as input a parsed XML document, and produces as output an XML document tree. It is the tree that is effectively the end result of the XSL process. If the tree is being written to a file then it has to be serialised in some way using the concrete XML syntax such that a parser could re-create the tree, but there is no way just from the characters in the leaves of the tree to control that serialisation. When parsing, & and <![CDATA[&]> both produce the same thing, namely the ampersand character. It thus surely follows that if an ampersand character is entered into the result tree, which is then to be written to a file, one of these must be written, but you can't control which from _within_ the tree. Well of course you can hypothesise extra information in addition to characters that gets stored in the internal tree. (As happens in the DOM where CDATA sections are distinguished). But that would be a big change (and not at all clearly a change for the better) but in any case it would seem to be a change in the basic data model on which XSL is working, it isn't just a small request to add one harmless extra tag. I am not arguing (here) that there should not be such functions, just arguing that adding them is a bigger step than has been implied in some recent messages. I would have argued that the same was true of comments, that comments parse to nothing, and so there was no way to output a comment to the result, but that battle appears to have been lost. Comments are no longer really comments in XML, they do form nodes in the internal tree structure, so the functionality of a comment is effectively lost (you could have used a comment element if you wanted a node, but still, it appears to be done now). David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XSL and HTML, Guy_Murphy | Thread | Re: XSL and HTML, Chris Maden |
Re: Mixed content transformation, Guy_Murphy | Date | DOM (was Standard API to XSL proces, keshlam |
Month |