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

Re: how do you determine if a property exists?

Subject: Re: how do you determine if a property exists?
From: David Buddrige <dbuddrige@xxxxxxxxx>
Date: Thu, 15 Apr 2004 00:34:13 -0700 (PDT)
property exists
Let me try that again (bumped the send button by
mistake)

I have the following code in a template I am working
on:

<xsl:attribute name="parent_id">
  <xsl:choose>
    <xsl:when test="@Predecessors=''">1</xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="@Predecessors"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:attribute>

My problem is that sometimes there is no @Predecessor
property in the source document.  So what I want to do
in that instance is to just create a parent_id with a
value of 1.

I have been looking for a function like
"exists(@Predecessor)", but there does not seem to be
such a function... does anyone know of a function that
will return true if a property exists in a source
document?

thanks heaps

David Buddrige.

--- David Buddrige <dbuddrige@xxxxxxxxx> wrote:
> Hi,
> 
> I have the following code in a template I am working
> on:
> 
> <xsl:choose>
>   <xsl:when test="@Predecessors=''">1</xsl:when>
>   <xsl:otherwise><xsl:value-of
> select="@Predecessors"/>
> </xsl:otherwise>
> 				</xsl:choose>
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

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.