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

RE: Can XPath / XSLT be aware of XML Schema content mo

Subject: RE: Can XPath / XSLT be aware of XML Schema content models grouping i nformation ?
From: Jerome Louvel <Jerome.Louvel@xxxxxxxxxxxxxx>
Date: Tue, 13 Nov 2001 14:23:39 -0500
x type xslt
Dear Jeni,

> We had a big discussion here a few weeks ago about whether
> there were actually any real-world requirements for accessing schema
> from XSLT. It seems there are lots of hypotheticals, but very few real
> cases, which is why I was quite interested in yours, particularly as
> the position of the particle corresponding to an element within a
> model group isn't something usually considered as important
> information.

I "invented" this "real world" example :) as a support for this discussion.

The source and result documents describe both a map containing a list 
of points with optional label. However the source document "flatten" the
list.

Source schema:
--------------
<xsd:complexType name="Map">
   <xsd:sequence maxOccurs="unbounded">
      <xsd:element name="X" type="xsd:integer">      
      <xsd:element name="Y" type="xsd:integer">   
      <xsd:element name="Label" type="xsd:string" minOccurs=0>   
   </xsd:sequence>
</xsd:complexType>


Result schema:
--------------
<xsd:complexType name="Map">
   <xsd:sequence>      
      <xsd:element name="Point" maxOccurs="unbounded">
         <xsd:complexType name="Map">
            <xsd:sequence>      
               <xsd:element name="X" type="xsd:integer">      
               <xsd:element name="Y" type="xsd:integer">   
               <xsd:element name="Label" type="xsd:string" minOccurs=0>   
            </xsd:sequence>      
         </xsd:complexType>
      </xsd:element>
   </xsd:sequence>      
</xsd:complexType>


So, without being able to do a <xslt:for-each> on the sequence, the
conversion seems to me already quite complex if you consider the potential
abscence of the Label element in the sequence.


> The more information is available in the data model, the more it's
> tied to a particular schema language.
So, in your mind where is the right balance ? 
Maybe a neutral / generic schema infoset in the XPath data model ?


Best regards,
Jerome

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.