PDA

View Full Version : XSLT to transform to XForm document


askanyquestions123
11-02-07, 03:23 PM
Consider an XML document like the one below. How can we write a generic XSLT stylesheet to transform this document to an XForms document? Transformation is based on the value of <type> and <nullable> elements. i.e all information we have is the data type of element and whether it accepts null values or not. In addition, the label of Xforms element form takes its value from <label> node.
Please bear in mind that the XSLT stylesheet must bee generic. i.e Reusable for any XML document with any number of <element> nodes.



<login>
<element>
<label> User ID </label>
<type> integer </type>
<nullable> false </nullable>
</element>
<element >
<label> Password </label>
<type> string </type>
<nullable> false </nullable>
</element>
<element >
<label> D.o.Birth </label>
<type> date </type>
<nullable> true </nullable>
</element>
</login>


I'll really appreciate any kind of help..Thank you in adnance.

UnrealEd
11-03-07, 12:47 PM
moving to Web Request and XML forum...

Could you post an example of what the XForm document would look like?