|
[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








