[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Constructing Simple Content and Built-in Template

Subject: RE: Constructing Simple Content and Built-in Template Rules
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 13 Apr 2005 10:29:15 +0100
constructing xml values
> Why does atomization of an element-only node raises an error? 
> Wouldn't it be
> better to concatenate the typed value of all node 
> descendants, as it is done
> with the string value?


The thinking is that in data-oriented XML, values are meaningless without
knowing the containing element tags. For example, it would be misleading to
consider

<person>
  <first>Henry</first>
  <last>James</last>
</person>

and

<person>
  <last>Henry</last>
  <first>James</first>
</person>

as equivalent. This contrasts with document-oriented XML, where the
convention is that the textual content is meaningful even if you strip away
all the tags. The implicit assumption is that element-only content indicates
data orientation, while mixed content indicates text orientation. This isn't
always true in practice, of course: look at the schema for XSLT 2.0
stylesheets for a counter-example. But even with element-only content, you
can get the string-value of any element node if you really want it by using
the string() function.

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.