Hi,
I'm trying to extract some data from an xml schema using XSLTs.
The main schema that I'm parsing contains xs:include statements pointing to
other schema files containing the definitions of the elements with some related
data that must also be extracted. What I need to do is for every element in my
main schema I need to look up its definition and extract some data from the
definition. If the definition is a complex type, then generally I have to look
up the definition of the composing elements in another schema.
The include statements for everything is only in the main schema. And that's
where my problem lies. I parse the main file and reach an element to look up..
which I can do easily using the ./xs:schema/xs:include match however once I get
to the included file and need to look up some of its element definitions, the
included file contains no xs:include tags since the includes were in the main
schema only. So I don't know how to find the schema containing the element's
definition.
I may have to maintain some sort of list (nodeset??) of the included schemas in
the main schema and refer to them later.
I did look at
http://www.biglist.com/lists/xsl-list/archives/200101/msg00535.html
which discusses recursive parsing of included schemas however I didn't
understand how the variables schemas and includes get initialized and how
exactly the information in the included schemas can be then accessed.
Any help would be really appreciated as I'm seriously going nuts trying to
figure this out! btw.. I am new at working with xslts.
Thank you!
- Raj
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list