|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Comparing content
I'm not sure what XSL processor you are using, but here are a few things to try: 1) try matching against supervisor/text() instead of supervisor 2) try ensuring that your path to your supervisor node is correct - I don't believe that it is. If you don't get the path right, it won't find it. For instance, from your XML it appears that the path would look more like: ../task/supervisor instead of ./supervisor - Chris Peter-Paul Koch wrote: > >Try something like: > ><xsl:if test="DOCUMENT[TAG1 = TAG2]"> > > <!-- do something --> > ></xsl:if> > > > >or > > > ><xsl:if test="DOCUMENT[TAG1 = TAG3/TAG4]"> > > <!-- do something --> > ></xsl:if> > > This is exactly what I've tried for days now, it just won't work. As soon > as you put a string behind the '=' everything works fine, but I want a > dynamic comparision. > > Cuurently I try in the <xsl:template select="role">: > > <xsl:apply-templates select="/JDF/project/role[@id = ./supervisor]" /> > > where the basic XML is > > <role id="pm"> > <blah...> > </role> > > <task> > <supervisor>pm</supervisor> > <blah...> > </task> > > Nothing happens... > > Provisional version: http://www.netlinq.nl/interest/xml/interest.xml > > ppk > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








