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

Re: Process one document, but change another

Subject: Re: Process one document, but change another
From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Sep 2014 14:56:46 -0000
Re:  Process one document
At 2014-09-08 14:05 +0000, Rick Quatro rick@xxxxxxxxxxxxxx wrote:
I have an XML document with a series of <image> elements. They have href
attributes that reference svg files. For each of these <image> elements, I
want to open the corresponding svg file and copy some information from my
source document to the svg file. So while the stylesheet is processing one
document, I want to be able to change the other documents. Is this possible
with XSLT? Any pointers would be appreciated.

In pseudo-code I would approach this as:



for-each image result-document href=new directory and name created from image/@href apply-templates mode=modify select=document(@href in old directory) with-param tunnel=yes name=info select=image information

  match=everything mode=modify
    copy
      apply-templates select=@*,node() mode=modify

  match=item-to-change-in-SVG mode=modify
    param name=info tunnel=yes
    change the item using the image information


I hope this helps and isn't too cryptic. It processes your documents from a source directory to your new target directory (since you can't overwrite a document that is being read).


. . . . . . Ken


-- Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/video.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: http://plus.google.com/+GKenHolman-Crane/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


--- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com

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.