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

Re: XSL document using XPath functions

Subject: Re: XSL document using XPath functions
From: "Carmelo Montanez" <carmelo@xxxxxxxx>
Date: Tue, 20 Nov 2001 14:49:56 -0500
using xpath functions in xslt
Hi:

    I believe the correct namespace is

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

By the way is "vehicle" a child of "individual"?, its
hard to tell you much since we can not see your actual
XML, try and paste part of the XML file.  I believe the
list strips any attachements.

Greetings,
Carmelo Montanez

----- Original Message ----- 
From: "Sylvie Millette" <millettes@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, November 20, 2001 11:21 AM
Subject:  XSL document using XPath functions


> Good morning,
> 
> I am just starting with XML/XSL and would like to use the function
> "contains" in an XSL document
> 
> here is part of my XSL document:
> 
> 
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="uri:xsl">
>   <xsl:template match="/">
> 
> <HTML>
> <BODY>
> 
> <font color='red'><B>SEARCH RESULT FOR : </B></font>
>      <xsl:for-each select="individuals/individual">
> 
>          <xsl:if test="contains(vehicle,'Sunfire')">
>             <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
>               <TR>
>                 <TD VALIGN="top" COLSPAN="2">
>                         <A><xsl:attribute
> name="HREF">'test.html'</xsl:attribute><xsl:value-of
> select="@name"/></A>
> 
>             </TD>
>               </TR>
>             </TABLE>
> 
>          </xsl:if>
>       </xsl:for-each>
> 
>     <XML ID="individual" SRC="individuals.xml"></XML>
> </BODY>
> </HTML>
> 
>     </xsl:template>
> </xsl:stylesheet>
> 
> 
> I am using IE5 could that be the problem?  I have tried to put  the
> following line
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org.1999/XSL/Transform"
> version="1.0">
> 
> instead of:
> 
> <xsl:stylesheet xmlns:xsl="uri:xsl">
> 
> If I replace the if statement by the following line it works:
> 
> <xsl:if test=vehicle[.='123 TRD Pontiac Sunfire 1995 noire'] >
> 
> SEE ATTACHED FOR XML DOCUMENT
> 
> Do I have to install something special for XPath function to work?
> Am I missing a namespace?  Is my syntax wrong?
> 
> Would really appreciate some help!
> 
> Thanks!
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 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.