[XML-SIG] xpath (4xpath) and CDATA

Uche Ogbuji uche.ogbuji@fourthought.com
Fri, 06 Apr 2001 09:49:08 -0600


> > This could be a performance nightmare (you'll be amazed how often
> > string-value() conversion is done in typical XSLT processing).  Besides, it
> > just papers over the one problem, but what about adjacent text/CDATA nodes?
> > What about entity reference nodes?
> 
> I don't care about entity references right now. :)
> 
> Fred and I disagree about the interepretation of the Xpath spec, so for
> now my changes just treat a CDATA identically to a text node.

Well, we don't know who else is out there: we just got a query about TEI lite. 
Woe betide anyone who tries to use TEI as 4DOM in XSLT.

But I guess going with the XP rule of solving the most tractable problem might 
be OK here.

I'd once though about adding a node.naziNormalize() sort of method, which 
would savagely go through the DOM expanding entity refs, merging adjacent text 
and CDATA nodes, and converting CDATA nodes to text.  I also considered 
recommending TreeWalker for using 4DOM with 4XPath.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python