Do not use on any
shared computer
August 29, 2008 08:10pm pdt
 
[x]
Attachment Details

How to reference transformed xml data back to original xml document no matter what stylesheet was used for transformation.

Tags: XML/XSLT, http://xopus.com
I have a pretty interesting problem on my hands here, I will try to explain it the best I can.

First let me say "Essentially I need a way to related the transformed data from and xslt stylesheet ( as best possble ) back to its xml source no matter what stylesheet is used to transform it. "

Below is my best example:

Suppose I have an xml document, we will cal it doc.xml and it looks similar to below:
<document>
     <heading name="heading1">
          My Heading
     </heading>
     <body name="body1">
          Some body data
     </body>
</document>

Also suppose I have some xslt document ( Could be any xslt document ) which transforms this xml into another xml document which might look like some html:

<div>
          <h1>My Heading</h1>
          <p>Some body data</p>
</div>

Now I need to be able to insert information in that resulting xml document that will allow me to related the transformed data back to the original document.

At frist I used two xslt pipes, the first marked the original document with unique id's. The second modified the stylesheeet so that these values were propagaed whenever the user used a value-of. The problem with that is it does not account for someone used complex xslt etc.

Essentially I need a way to related the transformed data ( as best possble ) back to its xml source no matter what stylesheet is used to transform it.

I know xopus [http://xopus.com/] does this through some sort of processing instructions and xslt pipes however I am not sure exactly how.

It seems to me that this would be a fairly common problem that needs to be solved when writing any type of xml editor that uses stylesheets, if anyone has experience with this I would really appreciated your help.

Note: This needs to be a pure xml/xslt solution. If you don't fully understand the problem I am presenting and want to get more information please e-mail me at cdj8050@rit.edu instead of posting questions here.

Thanks!

Cheers
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: sempinsenzai
Question Asked On: 06.05.2008
Participating Experts: 1
Points: 500
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by Gertone

Rank: Genius

Expert Comment by Gertone:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by sempinsenzai
Author Comment by sempinsenzai:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by Gertone

Rank: Genius

Expert Comment by Gertone:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by sempinsenzai
Author Comment by sempinsenzai:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by sempinsenzai
Author Comment by sempinsenzai:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by sempinsenzai
Author Comment by sempinsenzai:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628