Re: re-ordering an instance to match a schema
At 02:32 PM 5/14/2003, you wrote:
Some of you might remember that I was writing a small suite of XSLT to do roundtripping of XML instance data to HTML forms and back again, based on RNG (relax NG) schemas to define the forms. Well, I actually made some progress and have something that kinda-sorta works now. One issue though is that my code isn't smart enough to insert new elements in the "right" order*.
Two things that can help us answer this question:
1. Are we talking arbitrary RNG schemas, or some subset thereof?
2. By "reorder the instance to match the schema", we are talking about the order declared by the schema to be a valid order, or the order of the declarations? (The former, I take it. But this is why the first question is important.)
Seeing a sample of input (in this case, both inputs) and desired output would, as always, be a big help.
___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "Thus I make my own use of the telegraph, without consulting the directors, like the sparrows, which I perceive use it extensively for a perch." -- Thoreau
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format