xsl-list
[Top] [All Lists]

Re: [xsl] Use of data() function

2008-03-04 09:38:03
On 04/03/2008, John Snelson <john(_dot_)snelson(_at_)oracle(_dot_)com> wrote:
A node doesn't have a typed value if it is an instance of a complex type
 without mixed content.

On 04/03/2008, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
It occurs when the node is an element with element-only content (which
 necessarily means it is schema-validated). For example the person element in

 <person><first>Michael</first><last>Kay</last></person>

Thanks, I see a lot of this is in the XDM spec... (which I've never
had the pleasure of reading until now)

The key sections are:
http://www.w3.org/TR/xpath-datamodel/#TypedValueDetermination

and:
http://www.w3.org/TR/xpath-datamodel/#const-psvi-element
(type-valued section heading)

Out of interest, what is the reasoning behind allowing a mixed content
element's typed-value to be its string value, but making it an error
for element-only content?

Is it that you can't guarantee to get a string from element only
content, but mixed content you can (somehow) ?

thanks
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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