Re: [xsl] character entities

Subject: Re: [xsl] character entities
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 20 Nov 2001 17:47:27 GMT
> 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

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)


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

Current Thread