T
toffeem
Hi all,
I have 2 xml files.
Books.xml - defined all the available books information
Exclude.xml -defined the books ids which need to be filter.
I would like to write a xsl file (filter.xsl) to show book information
except those defined in exclude.xml. Can anyone have any idea how to
write this xsl file? Any help is appreciated.
Thanks in advance.
Toffeem
For example.
All Available Books data
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="filter.xsl"?>
<Books>
<BookRecs>
<Book>
<name>ABC book</name>
<id>1234567890</id>
<price>10.00</price>
</Book>
<Book>
<name>CDE book</name>
<id>1111111111</id>
<price>11.00</price>
</Book>
<Book>
<name>FGH book</name>
<id>2222222222</id>
<price>12.00</price>
</Book>
<Book>
........
</Book>
</BookRecs>
</Books>
The books need to be filter
<FilterBook>
<id>1111111111</id>
<id>2222222222</id>
</FilterBook>
My expected result:
Case 1: Show all the books information except those defined in
"Exclude.xml".
<html>
<table>
<tr>Book data:</tr>
<tr>ABC book - 1234567890 - 10.00</tr>
</table>
</html>
Case 2: If no book information can be shown after filtering
<html>
No book is available.
</html>
I have 2 xml files.
Books.xml - defined all the available books information
Exclude.xml -defined the books ids which need to be filter.
I would like to write a xsl file (filter.xsl) to show book information
except those defined in exclude.xml. Can anyone have any idea how to
write this xsl file? Any help is appreciated.
Thanks in advance.
Toffeem
For example.
All Available Books data
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="filter.xsl"?>
<Books>
<BookRecs>
<Book>
<name>ABC book</name>
<id>1234567890</id>
<price>10.00</price>
</Book>
<Book>
<name>CDE book</name>
<id>1111111111</id>
<price>11.00</price>
</Book>
<Book>
<name>FGH book</name>
<id>2222222222</id>
<price>12.00</price>
</Book>
<Book>
........
</Book>
</BookRecs>
</Books>
The books need to be filter
<FilterBook>
<id>1111111111</id>
<id>2222222222</id>
</FilterBook>
My expected result:
Case 1: Show all the books information except those defined in
"Exclude.xml".
<html>
<table>
<tr>Book data:</tr>
<tr>ABC book - 1234567890 - 10.00</tr>
</table>
</html>
Case 2: If no book information can be shown after filtering
<html>
No book is available.
</html>