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



On Mon, Apr 01, 2002 at 03:23:49AM -0800, Christopher R. Maden wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I wasn't very clear, I guess.  There are two separate things going on:

  Okay, I understand better.

> 1) The behavior of libxslt concerning relative URIs in <xsl:document> had 
> puzzled me.  The instant serialization explains that.  I had a workaround 
> already, passing the root directory as a parameter to the stylesheet so 
> that all URIs can be absolute.  This wasn't a problem, really just an 
> observation.

  okay,

> 2) There are some things I want to clean up after the XML-to-HTML 
> conversion.  They could be done with extension functions, but that seems 
> unnecessarily complicated (and not really my core skill set).  For 
> instance, the source documents have references to other documents by an ID 
> which can be looked up in a control file.  It seems easiest to generate an 
> <a> element in the HTML, and then post-process to locate the proper URIs 
> for the target documents.  There are also some characters which browsers 
> can't display easily; rather than have a cumbersome template matching every 
> text() node in the XSLT, it seems easier to iterate over the result in Perl 
> and do a quick series of s///s.
> 
> For these problems, it seems like delaying HTML and <xsl:document> is the 
> way to go.

  Okay, 2 things:
    - delaying the serialization of <xsl:document> result may not be 
      a good idea in all cases, it ends up consuming more memory for
      a longuer time
    - how to provide access to the not yet serialized document tree
      from the API. It seems the best is to associate them with the
      transformation context and provide an iterator the structures
      could be identical to the ones already used for caching docs
      coming from document(). The other API addition needed would be 
      a way to toggle bewteen the existing and delayed behaviour.
      Freeing the transofrmation context would then free the 
      document list.

  Sounds correct ?

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]