Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSLT Generator.. please help

Status
Not open for further replies.

suku123

Programmer
Jan 20, 2005
2
US
suku123 (Programmer) Jan 20, 2005
Hi,
I am trying to build an XSLT Generator. The input to this XSLT Generator is an XSD (say, source.xsd) AND the output format is Target.xsd. The objective is to generate an XSL.

Where do I start? Any design guidelines, best practices that you can suggest.

Is there any source code available anywhere?

Appreciate your help.

thanks
Suki
 
I think you have some wires crossed somewhere, that or you don't really understand what an XSD is...?

XSD mean "XML Schema Definition" and files of this type contain generic descriptions and rules by which elements within an XML document should follow. Basically what this means is that it describes an abstract set of rules to which the XML document must conform. Eg, it will define if the element <cat> can contain the attribute "claws" and how many sub elements (eg, <kittens>) it can contain, what order the sub elements are in etc etc. Take this example:

Code:
  <xsd:element name="cat">
        <xsl:element name="kitten"/>
        <xsd:attribute name="claws" type="xsd:positiveInteger"/>
  </xsd:element>

Read more at


for a primer.

XSD is far too loose and general to allow you to auto generate XSL from it. Because of this, you can create a XSD file from an XML document, but not the other way around.


Cheers

M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top