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

Re: Normalizing string containing entities

Subject: Re: Normalizing string containing entities
From: "Imran Rashid" <imranr@xxxxxxxxxxx>
Date: Fri, 14 Jul 2000 10:20:54 -0500
Re: Normalizing string containing entities
> Consider, for example, the following:
> 
> <para>Some    text    <em>some    other   text</em>   remaining  text</para>

<snip/>

> The answer I found in several books is that we should not have elements
> mixing CDATA and subelements. If we apply this rule, it is impossible to
> represent the real structure of text.

not entirely true.  There's nothing preventing you from marking up the plain
text as "plain" the same way you mark-up the emphasized text as "em".

eg, do this instead:

<para>
 <plain>Some    text    </plain>
 <em>some   other text</em>
 <plain>   remaining text</plain>
</para>


the drawbacks to this solution are that the structure can seem more
complicated, and it will use more memory (I think -- i'm no expert on
that...).  in addition, often-times you dont' even have control over the
original structure, so you have to use somebody else's model which mixes
content.
    but if you can set up your structure this way, it makes XSLT processing
much easier, as well as processing for other XML apps.

(this doesn't actually help w/ your initial problem, though, b/c there's
still the matter of stripping the whitespace in the middle of text nodes...)

Imran


 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.