[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: using xsl on two xml at the same time

Subject: RE: using xsl on two xml at the same time
From: Rick Taylor <taylor@xxxxxxxx>
Date: Thu, 10 Apr 2003 10:31:01 -0600
xsl two xml
Are you sure that all the elements actually have a 'value' attribute?

try using choose - when - otherwise instead of two ifs.

  <xsl:choose>
   <xsl:when test="./@value=$doc2/@value">
       <xsl:value-of select="local-name()"/> OK
   </xsl:when>
   <xsl:otherwise>
       <xsl:value-of select="local-name()"/> not OK
   </xsl:otherwise>
</xsl:choose>


At 01:46 PM 4/10/03 +0200, you wrote:
Hi

Im trying the follwing now

<xsl:template match="*">
<xsl:variable name="path" select="local-name()"/>
<xsl:variable name="doc2" select="document('test.xml')//*[name()=$path]"/>
<xsl:if test="./@value=$doc2/@value">
<xsl:value-of select="local-name()"/> OK
</xsl:if>
<xsl:if test="./@value!=$doc2/@value">
<xsl:value-of select="local-name()"/> not ok
</xsl:if>
<xsl:apply-templates/>
</xsl:template>


But somehow I dont get an output for each local-name?

Do anyone now why?

Best regards
Johan

-----Original Message-----
From: Michael Kay [mailto:mhk@xxxxxxxxx]
Sent: den 9 april 2003 20:31
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  using xsl on two xml at the same time


> <xsl:variable name="doc2" select="document('d:\foo.xml')" />


The argument to the document() function must be a URI, so this should
fail. Though some processors might accept a Windows filename in place of
a URI, they are wrong to do so.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Rick Taylor XML Developer PPDM Association


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.