Hello,
Unfortunately, I have a newbie question.
Given two xml data.
Each contain the same data structure.
I would like to select nodes from both of them which might fit an Xpath
condition (some attributes from xml1/nodes should be equal to attributes from
xml2/nodes).
Then I would like to select all other nodes that did not match the condition.
<xsl:variable name="input_IT_Stunde"
select="document(concat('../temp/stunde_',$Property_File/Vergleichseigenschaften/Input[(_at_)Sortierungsart='Maschine']/@Input_XML,'.xml'))/EinträgeListe"/>
<xsl:variable name="input_Manual_Stunde"
select="document(concat('../temp/stunde_',$Property_File/Vergleichseigenschaften/Input[(_at_)Sortierungsart='Hand']/@Input_XML,'.xml'))/EinträgeListe"/>
Is the following Xpath correct?
<xsl:variable name="matching_IT-Man"
select="$input_IT_Stunde/Eintrag[(_at_)Datum=$input_Manual_Stunde/Eintrag/@BZ_Abgangsdatum
and substring(@Zeit,1,2)=substring($input_Manual_Stunde/Eintrag/@BZ_Zeit,1,2)
and @Geographisch=$input_Manual_Stunde/Eintrag/@BZ_Geographisch and
@BBZ_Nummer=$input_Manual_Stunde/Eintrag/@BZ_BBZ_Nummer and @Leistungsangebot=
$input_Manual_Stunde/Eintrag/@BZ_DLA and
@Verarbeitungsart=$input_Manual_Stunde/Eintrag/@BZ_Verarbeitung and
@Format=$input_Manual_Stunde/Eintrag/@BZ_Format and
@Zustellart=$input_Manual_Tage/Eintrag/@BZ_Zustellart]"
/>
... for each $matching_IT-Man, do....
THEN : (Same Xpath condition as the first one, but with a negation not()
<xsl:variable name="NOT_matching_IT-Man"
select="$input_IT_Stunde/Eintrag[not(@Datum=$input_Manual_Stunde/Eintrag/@BZ_Abgangsdatum
and substring(@Zeit,1,2)=substring($input_Manual_Stunde/Eintrag/@BZ_Zeit,1,2)
and @Geographisch=$input_Manual_Stunde/Eintrag/@BZ_Geographisch and
@BBZ_Nummer=$input_Manual_Stunde/Eintrag/@BZ_BBZ_Nummer and @Leistungsangebot=
$input_Manual_Stunde/Eintrag/@BZ_DLA and
@Verarbeitungsart=$input_Manual_Stunde/Eintrag/@BZ_Verarbeitung and
@Format=$input_Manual_Stunde/Eintrag/@BZ_Format and
@Zustellart=$input_Manual_Tage/Eintrag/@BZ_Zustellart)]"
/>
... for each $NOT_matching_IT-Man, do....
The final result shoud be the whole XML1 input data.
Why I ask such a question is due to the fact that when I add all values
contained within one specific attribute, the resulting sum isn't equal to the
one of the main XML1 attributes.
Thanks for your help
Lawrence Michel
--~------------------------------------------------------------------
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>
--~--