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

Re: xsl looping 2 siblings help

Subject: Re: xsl looping 2 siblings help
From: -= jay =- <deepsweech@xxxxxxxxx>
Date: Thu, 23 Jun 2005 16:13:59 +0800
xtags foreach
thanks very much man! gotit!

On 6/23/05, -= jay =- <deepsweech@xxxxxxxxx> wrote:
> sorry i used xsl not xtags, typo
>
> On 6/23/05, -= jay =- <deepsweech@xxxxxxxxx> wrote:
> > Thanks clemens, but your code doesnt filter the xml. here is actual code
> > XML is:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <GetServiceInfoResult_1>
> >  <SERVICE itmns="1">
> >    <SERVICEIDSV>885</SERVICEIDSV>
> >    <SERVICEID>003</SERVICEID>
> >    <LISTOFLOCATIONS>
> >      <LOCATION>
> >        <LOCATIONID>3</LOCATIONID>
> >        <LOCATIONNAME>DEFAULT</LOCATIONNAME>
> >        <LOCATIONDESCRIPTION>This department hold all the services
> > that are allowed for accessing by default. (Do NOT DELETE or
> > UPDATE)</LOCATIONDESCRIPTION>
> >      </LOCATION>
> >    </LISTOFLOCATIONS>
> >    <LISTOFDISPLAYLOCATIONS>
> >      <DISPLAYLOCATION>
> >        <DISPLAYLOCATIONID>3</DISPLAYLOCATIONID>
> >        <DISPLAYLOCATIONNAME>DEFAULT</DISPLAYLOCATIONNAME>
> >        <DISPLAYLOCATIONDESCRIPTION>This department hold all the
> > services that are allowed for accessing by default. (Do NOT DELETE or
> > UPDATE)</DISPLAYLOCATIONDESCRIPTION>
> >      </DISPLAYLOCATION>
> >    </LISTOFDISPLAYLOCATIONS>
> >    <LISTOFCATEGORY>
> >      <CATEGORY>
> >        <CATEGORYID>1</CATEGORYID>
> >        <CATEGORYNAME>Arts</CATEGORYNAME>
> >        <CATEGORYDESCRIPTION>Arts</CATEGORYDESCRIPTION>
> >      </CATEGORY>
> >      <CATEGORY>
> >        <CATEGORYID>2</CATEGORYID>
> >        <CATEGORYNAME>Business, Finance, Industry</CATEGORYNAME>
> >        <CATEGORYDESCRIPTION>Business, Finance,
Industry</CATEGORYDESCRIPTION>
> >      </CATEGORY>
> >      <CATEGORY>
> >        <CATEGORYID>3</CATEGORYID>
> >        <CATEGORYNAME>Computers and Information Technology</CATEGORYNAME>
> >        <CATEGORYDESCRIPTION>Computers and Information
> > Technology</CATEGORYDESCRIPTION>
> >      </CATEGORY>
> >      <CATEGORY>
> >        <CATEGORYID>4</CATEGORYID>
> >        <CATEGORYNAME>Education</CATEGORYNAME>
> >        <CATEGORYDESCRIPTION>Education</CATEGORYDESCRIPTION>
> >      </CATEGORY>
> >      <CATEGORY>
> >        <CATEGORYID>9</CATEGORYID>
> >        <CATEGORYNAME>News</CATEGORYNAME>
> >        <CATEGORYDESCRIPTION>News</CATEGORYDESCRIPTION>
> >      </CATEGORY>
> >      <CATEGORY>
> >        <CATEGORYID>10</CATEGORYID>
> >        <CATEGORYNAME>Philosophy, Pyschology and Religion</CATEGORYNAME>
> >        <CATEGORYDESCRIPTION>Philosophy, Pyschology and
> > Religion</CATEGORYDESCRIPTION>
> >      </CATEGORY>
> >    </LISTOFCATEGORY>
> >  </SERVICE>
> >
> > My Code is:
> >
> >    <xsl:stylesheet>
> >        <xsl:template match="GetServiceInfoResult_1">
> >        <xsl:choose>
> >            <xsl:for-each select="SERVICE">
> >                <xtags:forEach select="LISTOFCATEGORY/CATEGORY">
> >                 <xsl:if select test="CATEGORYID='1'">
> >                 <xsl:value-of select="SERVICEIDSV"/>
> >                 <xsl:value-of select="SERVICEID"/>
> >                     <xsl:for-each
> > lect="LISTOFDISPLAYLOCATIONS/DISPLAYLOCATION">
> >                <xtags:value-of select="DISPLAYLOCATIONID"/><br>
> >                </xtags:for-each>
> >               </xsl:if>
> >            </xtags:for-each>
> > </xsl:choose>
> > ....
> > thanks
> >
>
>
> --
> *-::jay::-*
>


--
*-::jay::-*

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.