[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] writing new values to an extra document


Subject: [xsl] writing new values to an extra document
From: "Szabo, Patrick (LNG-VIE)" <patrick.szabo@xxxxxxxxxxxxx>
Date: Fri, 7 Nov 2008 10:38:18 +0100

Hi,

I have a quite tricky one for you.

I4m transforming files that have an element called 'gerichte'. Every week i
get new files, and there is the possibility that there are new values for
'gerichte' that i didn4t know before. if that is the case i want to write the
new and only the new ones into an extra file.

Little more explanation:

Let4s say i know the following values for 'gerichte': BSG, USG, OGH. Those are
the ones that i did consider in my stylesheets.
Now i get a delivery with new gerichte lets say: USK, VFGH, IAK. What i want
now is that those are added to the extra file that already exists, and
contains all known values for gerichte.

<gerichte>
<gericht>BSG</gericht>
<gericht>USG</gericht>
<gericht>OGH</gericht>
<gericht>USK</gericht>
<gericht>VFGH</gericht>
<gericht>IAK</gericht>
</gerichte>

The problem now is that I have no clue how to switch between the two different
result trees...
I tried it with <xsl:result-document> but Saxon is giving me the error
message

Error at xsl:result-document on line 183 of transform.xsl:
  XTDE1490: Cannot write more than one result document to the same URI:
  file:/W:/technik/dev/xsl_dev/gerichte.xml
...

Because I'm always writing to the same destination URI.

Idea someone ?!

Here4s what i have right now:

....
<xsl:variable name="gerichtsDokument" select="document('../gerichte.xml')"/>
<xsl:variable name="gerichtsWert" select="gericht"/>

     <xsl:result-document href="../gerichte.xml">
                <gericht>
                    <xsl:attribute name="date"
select="format-date(current-date(), [D]-[M]-[Y]')"/>
                    <xsl:value-of select="gericht"/>
                </gericht>
      </xsl:result-document>
....

cheers

Patrick Szabo
EPD / XSLT Konvertierung
Tel.: +43-1-534 52-1573
Fax.: +43-1-534 52-1573
patrick.szabo@xxxxxxxxxxxxx

LexisNexis Verlag ARD Orac GmbH & Co KG
Marxergasse 25, 1030 Wien
FN 8333f, Handelsgericht Wien
www.lexisnexis.at <http://www.lexisnexis.at/>


Current Thread
Keywords