|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] AW: Selecting Nodes by nodeset comparison
Here is a better explanation of my problematic : XML1 : <EintrdgeListe> <Eintrag Datum="20050212" Zeit="0800" Menge="64"/> <Eintrag Datum="20050214" Zeit="0800" Menge="36"/> <Eintrag Datum="20050214" Zeit="0800" Menge="22"/> <Eintrag Datum="20050214" Zeit="0800" Menge="2"/> </EintrdgeListe> XML2 : <EintrdgeListe> <Eintrag BZ_Abgangsdatum="20050211" BZ_Zeit="0800" BZF_MengeGezdhlt="147"/> <Eintrag BZ_Abgangsdatum="20050211" BZ_Zeit="0800" BZF_MengeGezdhlt="50"/> <Eintrag BZ_Abgangsdatum="20050212" BZ_Zeit="0800" BZF_MengeGezdhlt="49"/> <Eintrag BZ_Abgangsdatum="20050213" BZ_Zeit="0800" BZF_MengeGezdhlt="37"/> </EintrdgeListe> ----------- Is the following Xpath correct? <xsl:variable name="matching_XML1" select="$XML1/Eintrag[@Datum=XML2/Eintrag/@BZ_Abgangsdatum and substring(@Zeit,1,2)=substring($XML2/Eintrag/@BZ_Zeit,1,2)]" /> ... for each $matching_IT-Man, add a copy of those nodes to output.... --> Selected should be (from XML1): <Eintrag Datum="20050212" Zeit="0800" Menge="64"/> THEN : (Same Xpath condition as the first one, but with a negation not() <xsl:variable name="NOT_matching_XML1" select="$XML1/Eintrag[not(@Datum=$XML2/Eintrag/@BZ_Abgangsdatum and substring(@Zeit,1,2)=substring($XML2/Eintrag/@BZ_Zeit,1,2))]" /> ... for each $NOT_matching_IT-Man, add a copy of those nodes to output.... --> Selected should be (from XML1): <Eintrag Datum="20050214" Zeit="0800" Menge="36"/> <Eintrag Datum="20050214" Zeit="0800" Menge="22"/> <Eintrag Datum="20050214" Zeit="0800" Menge="2"/> ---------------------- The final result shoud be the whole XML1 input data. <Eintrag Datum="20050212" Zeit="0800" Menge="64"/> <Eintrag Datum="20050214" Zeit="0800" Menge="36"/> <Eintrag Datum="20050214" Zeit="0800" Menge="22"/> <Eintrag Datum="20050214" Zeit="0800" Menge="2"/> I hope this help Thanks for your help Lawrence Michel
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








