xsl-list
[Top] [All Lists]

[xsl] writing new values to an extra document

2008-11-07 04:38:51
Hi,
 
I have a quite tricky one for you.
 
I´m 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 didn´t 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:
 
Let´s 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 ?!

Here´s 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(_dot_)szabo(_at_)lexisnexis(_dot_)at

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






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>