At 2014-09-08 14:05 +0000, Rick Quatro rick(_at_)rickquatro(_dot_)com 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(_at_)CraneSoftwrights(_dot_)com
|
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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--