View Single Post
  #1 (permalink)  
Old March 14th, 2008, 02:01 PM
mphare mphare is offline
Friend of Wrox
Points: 470, Level: 7
Points: 470, Level: 7 Points: 470, Level: 7 Points: 470, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Plano, TX, USA.
Posts: 109
Thanks: 18
Thanked 0 Times in 0 Posts
Default Changing the Source Document

I may be trying to use XSLT in the wrong way, but I'd like to modify the source document.

I can do this using perl or php with XML/XSLT/XPATH extensions, but I'd rather use XSLT natively because it's more intuitive for this kind of thing.

Basically, I want to use XSLT (well, mostly XPATH) as an intelligent search and replace tool for XML files.

I have this rather large XML file that was generated by Adobe Framemaker. I have another XML file with information in it that I need to merge into the Framemaker XML document. I want to search through the FM document, find a place where information needs to be merged, go get that from the other XML file and place it into the FM file.

I can see how to do it by writing to a 3rd, output document. Except I'd have to write rules for all the structure for the FM document, which means a ton of rules. I'd rather just update the FM document in place.

Is XSLT going to help me here, or should I just write a perl script with xpath extensions?

I hope I'm just missing something very fundamental.


------------------------
GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876

Michael Hare
__________________
------------------------
Keep Moving Forward

GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF ACE5 CA93 7AD5 D8E3 A876

Michael Hare
Reply With Quote