[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: re-ordering an instance to match a schema

Subject: Re: re-ordering an instance to match a schema
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 14 May 2003 16:49:23 -0400
Re:  re-ordering an instance to match a schema
Hi Simon,

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*.

* where the "right" order is the order that things appear in the schema

The reason that's important is that xslt I've seen (and written ...) often assumes that the instance XML will be in a certain order and outputs in that order too, so that in this case with resumes I get job history listed before the name and address ;-)

Is there XSLT out there, that I can use, that will take an instance and a schema and re-order the instance to match the schema? Does that make sense?

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.

Cheers,
Wendell

___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_
    "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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.