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

test boolean expression in an attribute

Subject: test boolean expression in an attribute
From: Stefan Thull <pop3@xxxxxxxxxxxxxxx>
Date: Fri, 26 Aug 2005 13:28:25 +0200
xsl if test boolean
Hello,
I use a project management software, which produce a a xml-file as result.
It produces output with ids like:
-------example--------
<Task Id="nZA1" >
  <Name>Bauteil A 01</Name>
  <SubTasks>
   <Task Id="nZA1.ae06" >
    <Name>Technik</Name>
    <ParentTask>nZA1</ParentTask>
    <SubTasks>
     <Task Id="nZA1.ae06.fon_10" >
      <Name>Systemtelefon 10</Name>
      <ParentTask>nZA1.ae06</ParentTask>
     </Task>
    </SubTasks>
   </Task>
   <Task Id="nZA1.ae07" >
    <Name>Technik</Name>
    <ParentTask>nZA1</ParentTask>
    <SubTasks>
     <Task Id="nZA1.ae07.fon_10" >
      <Name>Systemtelefon 10</Name>
      <ParentTask>nZA1.ae07</ParentTask>
     </Task>
    </SubTasks>
   </Task>
  </SubTasks>
 </Task>
-------- end -----
Now I want every <Task> with an 'fon_10' in its Id.

I tried it with:
</xsl:template>    
    <xsl:template match="//Task">
       <xsl:if test="@Id contains 'fon_10'">
        <p>
            <xsl:value-of select="Name"/>
        </p>
           </xsl:if>
    </xsl:template>
but it throws an error.
" Error in expression @Id contains 'fon_10': Unexpected token <name> beyond 
end of expression"

Do you have a hint for me?
Tahnk you in advance
Stefan Thull

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.