Subject: [xsl] Translating XSD into an XSLT, experts approach needed From: "Daniel Bryant" <dan.bryant@xxxxxxxxxxxxxx> Date: Tue, 24 Feb 2004 19:51:28 -0000 |
Hi, I am currently working on my final year dissertation for a degree in computing. My dissertation involves the automatic translation of an XSD into an XSLT that will display an XML document compliant to the XSD as an XHTML web page. As part of my research I have to investigate and document how a human expert approaches the task of translating an XSD into an XSL document. If anyone could spare a few minutes briefly documenting how they would approach translating the XSD below (or even general approaches to translation), I would be very grateful. Examples of what I'm looking for: - The order of translation; i.e. do you create your XSL document by working down through the XSD code, do you pick out certain elements or do you use recursive methods / or a tree traversal method, preorder etc. - Do you write one template at a time or work on multiple ones. - Does the approach taken to generate the XSL code differ for each type of element (i.e. when translating strings, ints and custom types) - Are there any elements in an XSD that cause particular problems when translating, or you think would in automatic translation? - How do you approach writing XSL to display attributes, and when is this done in the translation process? - How (if at all) do you optimise your XSL code? - How do you debug errors? Kind regards, Daniel Bryant (Undergraduate, University of Surrey) <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="ANIMAL"> <xs:complexType> <xs:sequence> <xs:element name="DOG"> <xs:complexType> <xs:sequence> <xs:element name="ALSATION"> <xs:complexType> <xs:sequence> <xs:element name="AGE"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:minExclusive value="0"/> <xs:maxExclusive value="14"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="WEIGHT" type="xs:string"/> <xs:element name="COAT_COLOUR" type="xs:string"/> </xs:sequence> <xs:attribute name="Name" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:element name="MUNGREL"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="Name" type="xs:string" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="CAT"> <xs:complexType> <xs:sequence> <xs:element name="PERSIAN"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="0"/> <xs:maxLength value="10"/> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] node traversal, G. Ken Holman | Thread | RE: [xsl] Translating XSD into an X, Michael Kay |
Re: [xsl] node traversal, Wendell Piez | Date | Re: [xsl] node traversal, David Carlisle |
Month |