Re: [xslt] Re: 'Re: "Re: [xslt] Apply stylesheet to a subbranch of a document"'



On Wed, Sep 17, 2003 at 04:58:24PM +0200, Kasimier Buchcik wrote:
> > this code which is likely to be messy because it's not a formal part of
> > the standard, and the side effect could lead people to use it in situations
> > where they should not. Writing on top of an API is not a fork of said API !
> >   In general I take patches which don't look dangerous, this functionality
> > might be useful for others. 
> 
> I see. This functionallity is indeed not part of the XSLT-1.0 spec. 
> Well, for the complexity of the patch: xsltApplyStylesheetInternal would 
> need an additional argument for the initial context node; if it's 
> omitted (NULL) then it would take the doc as the initial context node.

  yes, that entry point is already very tunable, one more parameter...

> Yes, if we could transform subtrees directly (without the need to clone 
> them into a new document beforehand), we would gain a lot of speed. But 
> if it keeps you worried, than I bet you have insight on the problems 
> that might occur. As far as I learned from you, the problem is:
> Some whitespace of the source document is stripped, if required.
> Question: if xsltApplyStripSpaces (called by
>    xsltApplyStylesheetInternal) will still start the work on the 	
>    document element, where would be the difference?
> Is there anything else that keeps you worried?

  what worries me is that people might have the expectation to run the
transformation on the subtree and expect to continue working with their
document as if it hadn't been modified. At list a big warning in the 
function documentation would be needed.

> >   Transforming subtree is not described as part of XSLT-1.0 processing,
> > there is no reason to implement it except your request so far. And I
> > haven't even expected to go into a libxslt2 major change so far. I doubt
> > Red Hat would pay me to implement XSLT-2.0 for example.
> 
> Well, if I would be richer, I would be pleased to pay you for that :-)
> 
> Hmm, but I'm still no dime wiser about what to do now... so I'll go and 
> smoke a cigarette.

  Well try the function modification, we will put a big warning in the API
description, 

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]