Ah, I see.
Actually, i think that macro variables would be enough, if I would be able to
save them.
Here is my code so far:
<cfg:command name="get-stichworte">
<cfg:macro>
<cfg:sequence>
<cfg:command name="pick" parameter="Herausgeber
true Fuchs fuchs G.Weilinger g.weilinger Lanner lanner LexisNexis LexisNexis
Mohr mohr Stumvoll stumvoll Weilinger weilinger"/>
<cfg:set variable="autor" expression="%_"
plainString="true"/>
<cfg:get expression="$autor"/>
<cfg:command name="read-stichworte"
parameter="%_"/>
<cfg:command name="pick" parameter="Stichworte
false %_"/>
<cfg:set variable="stichwort" expression="%_"
plainString="true"/>
<cfg:command name="insertNode"
parameter="sameElementAfter[implicitElement]"/>
<cfg:get expression="$autor"/>
<cfg:command name="putAttribute"
parameter="herausgeber %_"/>
<cfg:choice>
<!--IF-->
<cfg:sequence>
<!--TEST-->
<cfg:test
expression="$autor!='LexisNexis'"/>
<!--THEN-->
<cfg:command name="pick"
parameter="Kodex false AVG BR HR StrR VfR WohnG ZGV"/>
<cfg:command
name="putAttribute" parameter="kodex %_"/>
<cfg:get
expression="$stichwort"/>
<cfg:command
name="putAttribute" parameter="idref_stichwort %_"/>
<cfg:get expression="$autor"/>
<cfg:command name="clean"
parameter="%-"/>
</cfg:sequence>
<cfg:sequence>
<!--ELSE-->
<cfg:get
expression="$stichwort"/>
<cfg:command
name="putAttribute" parameter="idref_stichwort %_"/>
<cfg:get expression="$autor"/>
<cfg:command name="clean"
parameter="%_"/>
</cfg:sequence>
</cfg:choice>
</cfg:sequence>
</cfg:macro>
</cfg:command>
<cfg:command name="read-stichworte">
<cfg:process showProgress="false">
<cfg:transform
stylesheet="stylesheets/get_keywords.xslt"
file="G:/Gesetzestextredaktion/daten/Stichworte/%0.xml"
to="G:/Gesetzestextredaktion/daten/Stichworte/%0_out.xml"
cacheStylesheet="true"/>
<cfg:read
file="G:/Gesetzestextredaktion/daten/Stichworte/%0_out.xml" encoding="UTF-8"/>
</cfg:process>
</cfg:command>
How could I use the <cfg:set> command to store macro variables?
I am thankful for every help.
wbr,
Roman
> -----Urspr?ngliche Nachricht-----
> Von: Hussein Shafie [mailto:hussein at pixware.fr]
> Gesendet: Mittwoch, 23. Februar 2005 13:51
> An: Huditsch Roman
> Cc: xmleditor-support at xmlmind.com
> Betreff: Re: AW: [XXE] if - then - else
>
> Huditsch Roman wrote:
> > I know that my commands seem to be a bit overly complex,
> but I haven't
> > yet found out how to reuse variables within a parameter attribute.
> > Therefore I am <cfg:get>ing the appropriate variable and
> pass it the the parameter attribute as "%_".
> > Is that the way it should work?
>
> Yes, but the question that you need to ask yourself is: do I
> really need XPath-variables ($stuff) to implement this macro?
>
> For simple macros, macro-variables (%stuff) are generally sufficient.
>
>
>
> > I also tried something like parameter="$var" but with no sucess.
>
> Right.
>
>
>