Processing XSD Schema File

P

Porthos

One of the virtues of using schemas is that they are XML documents
themselves. I have several schema files (one imports the next, which
imports the next, and so on) that describe/enforce the rules for XML
instance documents that I create.

I want to read and process these schema files using an XSL(T) document
to produce a user friendly/more readable version of these rules. I can
take care of the formatting, but how do I access the tags in the schema
documents from my XSL(T) file to get the information in the first
place?

Thanks,

-James
 
M

Martin Honnen

Porthos said:
One of the virtues of using schemas is that they are XML documents
themselves. I have several schema files (one imports the next, which
imports the next, and so on) that describe/enforce the rules for XML
instance documents that I create.

I want to read and process these schema files using an XSL(T) document
to produce a user friendly/more readable version of these rules. I can
take care of the formatting, but how do I access the tags in the schema
documents from my XSL(T) file to get the information in the first
place?

That is not different from any XSLT task (well XSLT processing an XML
file with namespaces) e.g.:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
version="1.0">

<xsl:template match="xsd:element">
...
</xsl:template>
</xsl:stylesheet>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top