This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to execute an expression XPATH in String





David Carlisle wrote:

Please do not take threads off list.

and i want to extract all value at
/html/body/Table/tr/td[1]/p,/html/body/Table/tr/td[2]/p,/html/body/Table/tr/td[3]/p........

so if i let $path=/html/body/Table/tr/td[1]/p
$tag=td
$index=1,2,..>


It's not at all clear what you mean by "extract" here.
If you just went
select="/html/body/Table/tr/td/p"
then that would select all p from all td elements and you would not need
[1] [2] etc at all.



Very sorry for my click on button reply.


infact i want to generate a list seperate of Value (Name of different Author) to an XML file like this:
<AuthorName>
value at Xpath: "/html/body/table/tr/td[1]/p" </AuthorName>

<AuthorName>
value at Xpath: "/html/body/table/tr/td[2]/p" </AuthorName>

<AuthorName>
value at Xpath: "/html/body/table/tr/td[3]/p" </AuthorName>

..........


I want this XSL work for a set of web page(Structure similar but the number of author is different), and i want to customize the tag: because a list of value may be found at some XPAth
a bit different.
<AuthorName>
value at Xpath: "/html/body/table[1]/tr/td/p" </AuthorName>
<AuthorName>
value at Xpath: "/html/body/table[2]/tr/td/p" </AuthorName>

That is the raison why i have create an template recursive. But it's too complicate to solve with String in XSL.

CAO.



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]