Re: [xsl] Suppressing multiple outcome

Subject: Re: [xsl] Suppressing multiple outcome
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 23 Nov 2006 14:31:51 GMT
> What i would like to do is to get the content of Tag <STREET>, 
Actually not, the content of the tag is "STREET", you want the stuff
between that tag and the closing tag, but actually XSLT doesn't work
with tags at all. (Using "Tag" to mean "Element" seems to be common, but
it's confusing)

		<xsl:variable name="myVar3" select="$myVar/PARVW = 'WE'"/>
			<xsl:if test="string($myVar3)='true'">

there is no need to coerce to a string and then test for equality, you
could just test the boolean directly

		<xsl:variable name="myVar3" select="$myVar/PARVW = 'WE'"/>
			<xsl:if test="$myVar3">

or more simply, just inline the variable definition, and the definition
of $myVar

			<xsl:if test="PARVW = 'WE'">

However if I understand you correctly you just want ORDERHEADER to contain
at most 1 copy of a STREET with PARVW = 'WE'", which is

 <xsl:copy-of select="(ITEM/DETAIL[PARVW='WE']/STREET)[1]"/>


Current Thread