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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inverting/Reverting/Flipping XSLT?

Status
Not open for further replies.

grande

Programmer
Feb 14, 2005
657
CA
Hi all,

I'm wondering if this is possible. I have an XSLT file that converts some XML from one standard to another. Is there a way that I can put the new standard in and get the old standard out? Like, tell it to do the exact opposite of what it's doing?

Otherwise, is there a tool/script that could generate these new documents for me automatically?

Thanks!

-------------------------
Call me barely Impressive Captain.
 
xslt has no obligation to preserve the info from "in-document" to "out-document". So basically I don't see how it can be done - it is not something to blame on xslt, and the question shouldn't be raised in the context of xslt in general.

If ever the info is totally preserved, you have to write the reverse case-by-case as there is no 1-1 relationship. Furthermore, anything not canonical in the "in-document" may be lost for good as well and new "non canonical" artifacts may be introduced in the reverse transformation.

One can imagine thought in some particular application where multiple standards are related to each others in such a manner there is some rigid relationship between them. Then the tool would be built for that application. Then sure...

But, in general, I would say no...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top