Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] XPath Query Required

From: Borut Bol&#x10D;ina <bob@-------->
To:
Date: 6/1/2005 6:13:00 AM
Hi,



if you have this XML (if I understand your question):
<root>
   <get-roleservices-recordrow>
   	<get-roleservices-RoleID>1</get-roleservices-RoleID>
   	<get-roleservices-ResourceID>6</get-roleservices-ResourceID>
   	<get-roleservices-IsWindowsEnabled>False</get-roleservices-IsWindowsEnabled>
   	<get-roleservices-IsLinuxEnabled>True</get-roleservices-IsLinuxEnabled>
   </get-roleservices-recordrow>
   <get-roleservices-recordrow>
       <get-roleservices-RoleID>1</get-roleservices-RoleID>
       <get-roleservices-ResourceID>4</get-roleservices-ResourceID>
       <get-roleservices-IsWindowsEnabled>False</get-roleservices-IsWindowsEnabled>
       <get-roleservices-IsLinuxEnabled>True</get-roleservices-IsLinuxEnabled>
   </get-roleservices-recordrow>
   <get-roleservices-recordrow>
       <get-roleservices-RoleID>1</get-roleservices-RoleID>
       <get-roleservices-ResourceID>6</get-roleservices-ResourceID>
       <get-roleservices-IsWindowsEnabled>True</get-roleservices-IsWindowsEnabled>
       <get-roleservices-IsLinuxEnabled>True</get-roleservices-IsLinuxEnabled>
   </get-roleservices-recordrow>
   <get-roleservices-recordrow>
       <get-roleservices-RoleID>1</get-roleservices-RoleID>
       <get-roleservices-ResourceID>9</get-roleservices-ResourceID>
       <get-roleservices-IsWindowsEnabled>False</get-roleservices-IsWindowsEnabled>
       <get-roleservices-IsLinuxEnabled>True</get-roleservices-IsLinuxEnabled>
   </get-roleservices-recordrow>
</root>

than this xpath



root/get-roleservices-recordrow[get-roleservices-RoleID='1' and
get-roleservices-ResourceID='6']/get-roleservices-IsWindowsEnabled

will select two "records".



So, the answer is - yes, it will.



-Borut







On 1.6.2005 6:59, Asim Qazi wrote:



Hi Borut,
   Thankx for the Quick reply,

i m sorry i missed in thing the "<get-roleservices-recordrow>" node will b
repeating with different combinations of RoleID and ResourceID,

will this query would b same even for repeating nodes ??



qAZI aSIM.








----- Original Message -----
From: "Borut BolD
ina" <bob@xxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, May 31, 2005 5:21 PM
Subject: Re: [xsl] XPath Query Required


 



In short:



get-roleservices-recordrow[get-roleservices-RoleID='1' and
get-roleservices-ResourceID='6']/get-roleservices-IsWindowsEnabled

-Borut



On 31.5.2005 14:13, Asim Qazi wrote:



   



Hi All
  <get-roleservices-recordrow>
<get-roleservices-RoleID>1</get-roleservices-RoleID>
<get-roleservices-ResourceID>6</get-roleservices-ResourceID>

     



<get-roleservices-IsWindowsEnabled>False</get-roleservices-IsWindowsEnabled



   



<get-roleservices-IsLinuxEnabled>True</get-roleservices-IsLinuxEnabled>
</get-roleservices-recordrow>





this is my xml strcture i want to read the value of
"get-roleservices-IsWindowsEnabled" where get-roleservices-RoleID=1 and
get-roleservices-ResourceID=6

thankx in advance.
Qazi Asim


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent