Subject: [xsl] Filtering out books with short description From: "Karl Koch" <TheRanger@xxxxxxx> Date: Tue, 19 Jul 2005 20:38:19 +0200 (MEST) |
Hello experts, all my postings here relate to a number of problems regarding one set of content I have to solve. I have a list of books (simplified to make our lifes easier:). This content needs to be transformed for various purposes. <bookshelf> <book> <title>First book</title> <description>text text text</description> </book> <book> <title>Second book</title> <description>text text</description> </book> <book> <title>Third book</title> <description>text</description> </book> </bookshelf> I would like to filter out all books with short descriptions. How can I do that? I curretnly see two different ideas of how this could be done (text lengh and number of text tokens) and wonder if you can help me with one or perhaps even both of them? 1) Copy only books with a description text of at least 5 letters in the resulting XML file. That would remove the third book. The result would only contain the first and teh second book. How can I do that? 2) Copy only books with at least 3 text tokens in the description element. After doing that only the first book would arrive in the resulting XML file. Is there a way to do that with XSLT? I am using XALAN. Kind Regards and many thanks in advance, Karl -- GMX DSL = Maximale Leistung zum minimalen Preis! 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] grouping/sorting on delimited, Nathan Shaw | Thread | RE: [xsl] Merging XML structure by , cknell |
Re: [xsl] Radio type and Button: Ne, Joris Gillis | Date | RE: [xsl] Merging XML structure by , cknell |
Month |