Sign In/My Account | View Cart  
advertisement

Article:
 Transforming XML Schemas
Subject: Does it work?
Date: 2003-01-29 09:36:42
From: Rogier Peters

Although I think this is a very good idea, I'm having a hard time getting it to work. It would have been nice to have an the full stylesheet and an example schema (For instance the po.xsd mentioned in the W3 link about NUN) available for download

Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Does it work?
    2003-01-29 12:33:13 Eric Gropp [Reply]

    With the exception of a root stylesheet element and namespace declarations, the sample XSLT code in the article comprises a complete stylesheet, which you should be able to execute.


    To execute it copy all of the sample code into a new XSLT document, with the exception of the enumeration ("AK"="Alaska") example; add namespace declarations for the prefixes "xs" and "xsl"; and add associate the "frm" prefix with any custom namespace.


    As the article mentions, the sample XSLT is limited, and it will not accept NUNs that refer to complex types as used in po.xsd. However russian-doll type schemas will work well with the sample XSLT code, such as the Common Alerting Protocol that recently appeared on the XML cover pages (http://xml.coverpages.org/ni2003-01-06-a.html).


    If you download that schema, and transform it with the XSLT from the article with a "targetNUN" parameter set to "element::alert", you will get an HTML form. You can then further annotate the schema to provide user friendly labels.


    The sample XSLT is far reduced from what you would want to use in a production system, however it contains all of the key elements that we've been using for a variety of applications for 12 months.


    Best of Luck and Happy Transforming!


    -Eric G.






Sponsored By: