[xslt] Re: [xml] Iterating through multiple HTML docs



[ moving to xslt@gnome.org since it's more appropriate ]

  Hi Chris,

On Mon, Apr 01, 2002 at 12:21:24AM -0800, Christopher R. Maden wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm using Perl with XML::LibXML and XML::LibXSLT.  After converting XML to 
> HTML with XML::LibXSLT, I have a result object which is an 
> XML::LibXML::Document (a/k/a XML_HTML_DOCUMENT_NODE).  I want to iterate 
> over it to do a little post-processing, but I can't figure out how to get 
> into the HTML documents created with <xsl:document> in the 
> stylesheet.  Obviously they're there somewhere, since the serializer knows 
> about them, but they don't seem to be in the form of any of the 21 defined 
> node types.

  Hum, actually, no, they aren't there anymore. What happens is that
libxslt create a new document, in that extension function, process the
related XSLT instructions, and once done, serialize the document and
free up the result tree. At the end of the stylesheet processing the
result tree returned is only for the main instance.
  So unless XML::LibXSLT does some specific processing there is no
way ATM to do post processing on <xsl:document>. A relatively easy way
would be to add a callback API to catch the serialization processing,
and possibly override it with a custom function.

  That's the problem with extension functions in general, they were not
part of the standard and it takes time to really grasp all the aspects
required to integrate them properly :-\

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.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]