Re: [xsl] Process one document, but change another

Subject: Re: [xsl] Process one document, but change another
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Sep 2014 15:45:49 -0000
Sure you can do this

> 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.

that might become

<xsl:template match="image">
  <xsl:result-document href="new{@src}.svg">
    <xsl:apply-templates select="doc(@src)" mode="modify-image">
      <xsl:param name="some-info" select="some-info" tunnel="yes"/>
    </xsl:apply-templates>
  </xsl:result-document>
</xsl;template>


Michael Kay
Saxonica
mike@xxxxxxxxxxxx
+44 (0) 118 946 5893




On 8 Sep 2014, at 15:05, Rick Quatro rick@xxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hello All,
>
> 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.
>
> Rick
>
> Rick Quatro
> Carmen Publishing Inc.
> 585-366-4017
> rick@xxxxxxxxxxxxxxx

Current Thread