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

RE: checking for tag/attribute that could occur at various l

Subject: RE: checking for tag/attribute that could occur at various levels
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Thu, 17 Aug 2000 19:57:07 +0100
xsl if tag attribute
Eric,

><xsl:template match="link">
>  <xsl:if test="@internal">
>    <xsl: if test= "  <!-- this is where my question fits --> ">
>      <A>
>        <xsl:attribute name="href">#<xsl:value-of select="@internal"
>/></xsl:attribute>
>        <xsl:value-of select="@text"/>
>      </A>
>    </xsl:if>
>  </xsl:if>
>  <!-- other stuff not relevant to this e.g.-->
></xsl:template>
>
><xsl:template match="bookmark">
>  <xsl:if test="@name">
>    <A><xsl:attribute name="name"><xsl:value-of select="@name"
>/></xsl:attribute></A>
>  </xsl:if>
></xsl:template>
>
>I want to add something here that only continues if there is a
>bookmark/@name that equals link/@internal.  <bookmark name="namehere"/> can
>occur at various levels within other tags (e.g. in might be within
><section>...</section>, within <section><para>...</para></section>, or some
>completely different set of tags).

You want

<xsl:if test= ".[@internal = //bookmark/@name]">


>Also, for the moment I'm stuck using the old microsoft namespace
>(xmlns:xsl="http://www.w3.org/TR/WD-xsl")--does anyone know if I can use
>xsl:when/otherwise with that, or is that one of the many items it
>chokes on.

It works fine

Ciao Chris


 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.