PDA

View Full Version : XML/XForms problem



askanyquestions123
10-31-2007, 06:58 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>


Please help me. Thank you.