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

RE: XSL siblings

Subject: RE: XSL siblings
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 28 Jun 2005 11:35:21 +0100
xls variable
Your XML doesn't include a DISPLAYLOCATIONS element, and this code is so
obviously ill-formed:

>      <xsl:for-each select="LISTOFDISPLAYLOCATIONS/DISPLAYLOCATION">
>           <xls:variable id="locationId"          
> select="DISPLAYLOCATIONID"/>
>               <xsl:if test"$locationId =3">

that I'm not going to start working out what you might have meant. Please
take a little more care over the questions you send to this list if you want
people to take care over the answers.

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: -= jay =- [mailto:deepsweech@xxxxxxxxx] 
> Sent: 28 June 2005 10:22
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  XSL siblings
> 
> tnx for the reply Michael, I tried using "../C" it doesnt work either:
> now here's my actual code. it's quite long im very sorry,
> 
> my xml:
> <GetServiceInfoResult_1>
>   <SERVICE itmns="1">
>     <SERVICEID>10003</SERVICEID>
>     <LISTOFLOCATIONS>
>       <LOCATION>
>         <LOCATIONID>3</LOCATIONID>
>         <LOCATIONNAME>DEFAULT</LOCATIONNAME>
>       </LOCATION>
>     </LISTOFLOCATIONS>
>     <LISTOFLOCATIONS>
>       <LOCATION>
>         <LOCATIONID>4</LOCATIONID>
>         <LOCATIONNAME>OFFICE</LOCATIONNAME>
>       </LOCATION>
>     </LISTOFLOCATIONS>
>     <LISTOFDISPLAYLOCATIONS>
>       <DISPLAYLOCATION>
>         <DISPLAYLOCATIONID>3</DISPLAYLOCATIONID>
>         <DISPLAYLOCATIONNAME>DEFAULT</DISPLAYLOCATIONNAME>
>       </DISPLAYLOCATION>
>       <DISPLAYLOCATION>
>         <DISPLAYLOCATIONID>7</DISPLAYLOCATIONID>
>         <DISPLAYLOCATIONNAME>AWAY</DISPLAYLOCATIONNAME>
>       </DISPLAYLOCATION>
>     </LISTOFDISPLAYLOCATIONS>
>     <LISTOFCATEGORY>
>       <CATEGORY>
>         <CATEGORYID>10</CATEGORYID>
>         <CATEGORYNAME>Philosophy, Pyschology and 
> Religion</CATEGORYNAME>
>         <CATEGORYDESCRIPTION>Philosophy, Pyschology and
> Religion</CATEGORYDESCRIPTION>
>       </CATEGORY>
>       <CATEGORY>
>         <CATEGORYID>11</CATEGORYID>
>         <CATEGORYNAME>Reference</CATEGORYNAME>
>         <CATEGORYDESCRIPTION>Reference</CATEGORYDESCRIPTION>
>       </CATEGORY>
>     </LISTOFCATEGORY>
> ... and so on
> 
> so the 3 sibling nodes are LISTOFDISPLAYLOCATIONS, DISPLAYLOCATIONS
> and LISTOFCATEGORY
> 
> first is i filter through LISTOFCATEGORY which SERVICE to display(i
> pass a $setSubjectId variable)
> <xsl:for-each select="//SERVICE[LISTOFCATEGORY/CATEGORY/CATEGORYID =
> $setSubjectId]">
>     
>    now i check if the SERVICE can be displayed
>      <xsl:for-each select="LISTOFDISPLAYLOCATIONS/DISPLAYLOCATION">
>           <xls:variable id="locationId"          
> select="DISPLAYLOCATIONID"/>
>               <xsl:if test"$locationId =3">
>               now i want to loop through DISPLAYLOCATIONS and 
> display all of'em
> 
> 
> Thanks verymuch michael!
> 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.