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

XSLT and XML Schema

Subject: XSLT and XML Schema
From: Garvin Riensche <g.riensche@xxxxxxx>
Date: Wed, 13 Jun 2007 16:50:41 +0200
 XSLT and XML Schema
Hi,

I am looking for tutorials about the use of XML Schema within Stylesheets where the schema is used to get information about the source document structure. I know how I can use XML Schema for validation of a document or a part of it but what I am looking for is how I can get information about the source document structure from the schmema.

Let me post an example:

Suppose the following XML as input together with his associated schema. The parser will additionally get the parameter SrcName='A'

<class id="2" pkgid="1" classname="A">
	<field id="21" type="basic" typename="int" name="publ_int_i"/>
	<field id="22" type="basic" typename="long" name="long_d"/>
	<modifier modified_id="21" modifier="public"/>
</class>

When creating the stylesheet (which should be created dynamically later), I know that there is "class" Element with 3 attributes but I don't know the name of the attributes. Is it possible to get the names of the attributes from the schema so that they can be used in a <xsl:match> element like

<xsl:match pattern="//class[*ask-schema-which-attribute-is-the-third-one()=$SrcName*]>
?


Maybe this sounds confusing but what this all is about is a comparison between so called "conditional transformations (cts)", which are implemented in prolog and are used to transform prolog facts, and xslt. The prolog facts are translated to XML and I am trying to translate these cts to xslt to see what is more powefull, cts or xslt.

Regards,
Garvin

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.