Re: [xsl] A colon is not allowed in the name

Subject: Re: [xsl] A colon is not allowed in the name
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Wed, 25 Mar 2009 23:40:57 +0000 (GMT)
Deborah Pickett wrote:

  Hi,

> > XSLT will only handle input that is well-formed XML
> > conforming to the Namespaces recommendation.

> I'm curious: why?  Normally the XSLT standard is pretty
> standoffish about parsing (and serialization), and leaves
> such matters to the XML parser.

  You are right.  Because the input to the transform is an abstract tree
represented as an XDM instance.  And it is not possible to represent an
element with the name "a:b" (do not see any namespace-related feature there)
with XDM.  But that does not mean you have to get any lexical representation
of the tree, it can be generated directly in memory by your application by
example.

  But in any case, the input must conform to the namespaces recommendation (in
the exact same way as in "an XDM instance conforms to the namespaces
recommendation".)

  An interesting example in that context is an XML parser that parses HTML
documents, as Tidy HTML or Tag Soup.  The input you give to the parser can
even be ill-formed (as it is not a well-formed lexical representation of an
XML document,) but the input of the transform is not exactly what you see in
your file, this is the view of this file that the parser shows to the
transform.  And *that* input is an XDM instance.

  Hope that helps.  Regards,

--
Florent Georges
http://www.fgeorges.org/

Current Thread