This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: feature request




> A XML transformation language should (IMHO) be able to produce whatever
> valid XML you want to produce and it's not the case with XSLT without
> nasty kludges.

It comes down to the question "what is an XML document?" A question on
which the XML specification is remarkably silent.

XSLT does not transform the concrete syntax for one XML document into
the concrete syntax for another, and so the question is: what is
an entity reference. The view taken by XSL is that (like CDATA marked
section) it is just a flag to the parser to take some particular action,
but the actual XML document (aka source tree aka infoset aka grove)
just contains the resulting data, not the information about how that
data came to be parsed from an external file.

So you can't ask `extend XSL so that it can write &foo;' without first
asking to extend the data model so that it contains entity reference nodes,
and extend the XML 1.0 parsing model so that entity references produce
new nodes in the XML document tree. 

So not being able to write α doesn't limit the XMl documents that
you can write (for this definition of "XML document") it just limits
the number of ways in which that document can be serialised. So
from this point of view it's no worse than not having control over
whether " or ' is used around attribute values.

> unless you want to implement a mechanism as nasty as the one which is
> inserting the entity references in the HTML output methods :( 

that seems a perfectly clean solution to me. It doesn't require anything
other than characters to be stored in the internal representation, it
just has a list of special characters that are linearsied using entity
references that is longer than the list of special characters for
which this is done in the XML output method.

David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]