[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Filtering out books with short description

Subject: Filtering out books with short description
From: "Karl Koch" <TheRanger@xxxxxxx>
Date: Tue, 19 Jul 2005 20:38:19 +0200 (MEST)
description of the books
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.