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

Re: How do I capture the text "around" a node?

Subject: Re: How do I capture the text "around" a node?
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Wed, 25 Sep 2002 15:04:05 +0100
xml text
Peter Lavender wrote:

>Acutally, I should have added a bit more:
>
><?xml version="1.0" ?>
><book isbn="1234567890">
>
>Its title (<title>The Lord of the Rings</title>)
>
>is often misquoted!
>
><author>J R R Tolkien</author>
>
>...
>
></book>

This begs a question, if these pesky () are so hard to get rid of, why
are they there in the first place?

You imply that <title/> is *always* surrounded by ().  I guess you
have some other stylesheet for this document which leaves them in?

In which case you might find it much easier to either

a) leave them out of the document altogether, and add them back in the
other stylesheet.

b) instead of writing () invent an element to do the same job, i.e.
write
<parenthesis><title>...</title></parenthesis>

In other words, check your design: is the () really text, or is it
some kind of markup?  If the latter, revisit the design if you can.

Difficult programming tasks are often the result of imperfect design.
This seems to be particularly true of XML+XSLT for some reason.

HTH
Trevor Nash
--
Traditional training & distance learning,
Consultancy by email

Melvaig Software Engineering Limited
voice:     +44 (0) 1445 771 271 
email:     tcn@xxxxxxxxxxxxx

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


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.