Hi All,
I've got the following HTML fragment:
<td>
<b>Author: </b>
<a href="show.asp?author=Firtsname+Lastname">Firstname Lastname</a><br/>
<b>Format: </b>
Paperback<br/>
<b>ISBN:</b>0999999999 <b>Pages:</b> 44<br/>
<b>Date:</b> 1/1/1999<br/>
<b>Publisher: </b>
<a href="show.asp?publisher=Publisher+Company">Publisher Company</a>
<br/> <br/>
</td>
If I analize this with XPath I got the following results:
Xpath: /td/b
Result:
Author:
Format:
ISBN:
Pages:
Date:
Publisher:
Xpath: /td/text()
Result:
(blank line)
Paperback
0999999999
(blank line)
44
1/1/1999
(blank line)
Xpath: /td/a
Result:
Firstname Lastname
Publisher Company
I can access with XPath any of these records, like this: /td/b[1] (word: Author
and /td/a[1] (author's name); or /td/b[2] (word: Format
and /td/text()[2] (Paperback).
The problem is that all those fields are optional and the two fields with links (Author and Publisher) don't need to be with links, they could be like the others fields (ISBN, Format, etc.)
I would like create a XSLT that could analyze all these options if is possible.
Thanks,
Arty
I've got the following HTML fragment:
<td>
<b>Author: </b>
<a href="show.asp?author=Firtsname+Lastname">Firstname Lastname</a><br/>
<b>Format: </b>
Paperback<br/>
<b>ISBN:</b>0999999999 <b>Pages:</b> 44<br/>
<b>Date:</b> 1/1/1999<br/>
<b>Publisher: </b>
<a href="show.asp?publisher=Publisher+Company">Publisher Company</a>
<br/> <br/>
</td>
If I analize this with XPath I got the following results:
Xpath: /td/b
Result:
Author:
Format:
ISBN:
Pages:
Date:
Publisher:
Xpath: /td/text()
Result:
(blank line)
Paperback
0999999999
(blank line)
44
1/1/1999
(blank line)
Xpath: /td/a
Result:
Firstname Lastname
Publisher Company
I can access with XPath any of these records, like this: /td/b[1] (word: Author
The problem is that all those fields are optional and the two fields with links (Author and Publisher) don't need to be with links, they could be like the others fields (ISBN, Format, etc.)
I would like create a XSLT that could analyze all these options if is possible.
Thanks,
Arty