Re: [xslt] scoped result tree fragments
- From: Daniel Veillard <veillard redhat com>
- To: Mark Vakoc <thevakoc-xml yahoo com>
- Cc: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] scoped result tree fragments
- Date: Thu, 8 Jul 2004 15:03:00 -0400
On Thu, Jul 08, 2004 at 10:13:12AM -0700, Mark Vakoc wrote:
> Thanks for the pointers, I'll experiment with that approach. However I forsee
> a potential problem. The content passed into xmlNewTextChild() currently may
> contain xml special characters such as '&'. It will not contain any entity
> refs. If I use xmlDictLookup() I could have node->content on the text node
> that has reserved xml characters. I believe that is ok (the serialization
> layer must handle that?), but can you confirm that a text node's content may
> contain xml special characters not replaced with their entity refs?
if it the 5 characters for which predefined entities are defined, it's
just fine, the serialization layer will handle those, this also need
to be UTF8 but it's not a surprize.
> Also I should see some benefit from using the dictionary for node->name. Most
> of the nodes are named the same thing so I need call the xmlDictLookup() only
> once, and can just use the returned value for calls to xmlNodeEatName() to
> create the element node.
yes, that will work just fine. The avoid xmlNewTextChild(), use
xmlNodeEatName(), xmlNewDocText() and xmlAddChild() directly.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]