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

Re: character entities

Subject: Re: character entities
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 20 Nov 2001 17:47:27 GMT
character entities star
> These should be abolished anyway, as Jeni already mentioned.

why? they make life more interesting...

> It is tempting to replace them by
> 
> <nag:refer item="e04BL-a"/>

But as I mentioned in the reply to Jeni, a) you lose a lot of validation
checks if you do that as you would have to basically allow nag:refer
everyhere, and it would be able to refer to any content. thus
effectively you have no schema/dtd any more: any construct is allowed in
any other, by use of this indirection.

b) The logic in the stylesheet becomes muct more difficult. Simple
stylesheets that are just falling down the tree with <apply-templates/>
can easily cope with <nag:refer item="e04BL-a"/> just by moving off to
somewhere using document() and then processing the referred text.

But the stylesheets have a lot of logic querying the structure of
the tree.:
  If this parameter is an array whose dimension is given by some other
  sibling parameter, and if that parameter has a child element
  constraining it to be less than some other parameter,... then.. do
  something. 

this sort of logic becomes _really_ hard to maintain if in _every_ step
of every Xpath expression you have to take account of the fact that
the elements you are looking for might not be in the tree directly but
only in the trees referred to by  <nag:refer (or xinclude for that
matter). That's the nice thing about entities: when walking over the
tree you dont need to care if the text is directly in the document or in
an entity (of course every now and then this nice thing bites back, but
most of the time this is what you want)

David



_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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.