xsl-list
[Top] [All Lists]

Re: XSL siblings

2005-06-28 02:21:33
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>