xsl-list
[Top] [All Lists]

RE: [xsl] Schema awareness, normalizedString, token

2007-02-21 07:58:02
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(_dot_)tverskov(_at_)gmail(_dot_)com 
[mailto:jesper(_dot_)tverskov(_at_)gmail(_dot_)com] On Behalf Of Jesper 
Tverskov
Sent: 21 February 2007 14:38
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>