RE: [xsl] Schema awareness, normalizedString, token

Subject: RE: [xsl] Schema awareness, normalizedString, token
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 21 Feb 2007 14:57:37 -0000
xsl:copy copies nodes from the input tree, including text nodes. It never
attempts to find the typed value of a node. The processor has some
flexibility here because it is allowed to normalize the value while building
the tree, but it isn't required to (and in my view it's better not to).

xsl:value-of creates a text node typically by atomizing the value of an
input node, that is, taking its typed value. The typed value for types such
as xs:normalizedString will have been whitepace-normalized.

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



> -----Original Message-----
> From: jesper.tverskov@xxxxxxxxx 
> [mailto:jesper.tverskov@xxxxxxxxx] On Behalf Of Jesper Tverskov
> Sent: 21 February 2007 14:38
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Schema awareness, normalizedString, token
> 
> Hi
> 
> I have been testing XSLT 2.0 schema awareness using XMLSpy 
> 2007 to see if whitespace is replaced/deleted, etc, as it 
> should be when datatypes like xs:nornmalizedString and 
> xs:token is declared in the schema.
> 
> The whitespace rules of those datatypes are honored when I 
> use <xsl:value of> but not when I use the identity template 
> and <xsl:copy>.
> 
> Is that how things should be, (why?), or how it also works in Saxon?
> 
> Cheers
> Jesper Tverskov

Current Thread