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

Re: in this xsl , why dont get result with substring-

Subject: Re: in this xsl , why dont get result with substring-before ..
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Fri, 25 Mar 2005 13:44:56 -0000
qotes
----- Original Message ----- From: "henry human" <henry_human@xxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, March 25, 2005 1:37 PM
Subject: in this xsl , why dont get result with substring-before ..



Problem number 1)i have this two files. when i try to
get with substring-before or substring-after i get no
data

You have qotes around bbb which means you are looking for the string "RRR" inside "bbb" rather than the valu of the element bbb.


Problem number 2)
why i get in this for-each loop only one
time the content of workstep1 node

I don't follow, there is only one Jobsdetails and only one worksPart1 and no workstep1, what do you mean?


Problem number 3)
what is the other alternativity to call a template
in this loop instead of to use xsl:apply-templates ?
thanks

Again the holiday mood has taken over, Can you clarify what you want to achieve?


<?xml version='1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="/Job"> <html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

</head><body>

<table>
<tr>
  <td></td>    <td> <b>JOB Desc. </b></td></tr>

<xsl:for-each select="Jobsdetails">
<tr>
  <td></td>
      <td>  <xsl:value-of
select="jobDescription"/></td>

</tr>

<xsl:apply-templates select="worksPart1"/>
</xsl:for-each>
</table></body></html>

</xsl:template>


<xsl:template match="worksPart1" > <tr> <td></td> <td> <xsl:if test="contains(bbb,'RRR')"> <xsl:value-of select="substring-before('bbb','RRR')"/> +<xsl:value-of select="substring-after('bbb','RRR')"/> </xsl:if> </td>

</tr>

</xsl:template>
</xsl:stylesheet>


------------------------------------------ <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <Job>


<Jobsdetails> <jobDescription>mydescription</jobDescription> <worksPart1>

<bbb>beforeRRRafter</bbb>
<worksNr>20362</worksNr>

</worksPart1>
</Jobsdetails>
</Job>



Joe

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.