Re: multiple xpaths

2005-10-06 Thread David
Thanks for all the help. I will not be able to work on this for a while so I don't have anything to show right now. Thanks David Geert Josten wrote: If you have a working version of your XSL, send me a copy. I might find a moment to look for some speed improvements.. Cheers, Geert David

Re: multiple xpaths

2005-10-05 Thread Geert Josten
Hi David, Here one that doesn't need all the stepping through the modes. But it does require you to put more effort in the configurating file.. IN: ?xml version=1.0? xpaths:xpaths xmlns:xpaths=xpaths xmlns:xhtml=xhtml xpaths:xpath match=xhtml:img xpaths:attribute name=class

Re: multiple xpaths

2005-10-04 Thread Christoph Hermann
Sandor Spruit schrieb: Hello, ... select=xalan:evaluate($parameter_xpath) I was hoping for a reply like this - even though a dynamic stylesheet seemed to be a smart move :) I'll give it a try this afternoon. The use of an extension function *would* but much easier - if it worked, but it

Re: multiple xpaths

2005-10-04 Thread Geert Josten
Hi David, Actually, it has. Sandor suggested to generate an XSL using the xpaths you want to match as input. As long as not every requests needs a new XSL, this will be fairly efficient. And though a DOM tree is being build from the input SAX events for the XSL transform, you do not need to

Re: dynamic template matches (was: multiple xpaths)

2005-10-04 Thread Geert Josten
(changed the subject line) An other Idea i came up with yesterday was the use of names for your template. So if you do a xsl:template match=* xsl:apply-templates select=xalan:evaluate($parameter_xpath) mode={$parameter_xpath} / /... and then a xsl:template match=*

Re: multiple xpaths

2005-10-04 Thread David
Geert Josten wrote: Hi David, Actually, it has. Sandor suggested to generate an XSL using the xpaths you want to match as input. As long as not every requests needs a new XSL, this will be fairly efficient. And though a DOM tree is being build from the input SAX events for the XSL transform,

Re: multiple xpaths

2005-10-04 Thread Geert Josten
I take the challenge to make this work in XSL. Just give me about 15 min. :-) David wrote: Geert Josten wrote: Hi David, Actually, it has. Sandor suggested to generate an XSL using the xpaths you want to match as input. As long as not every requests needs a new XSL, this will be fairly

Re: multiple xpaths

2005-10-04 Thread Geert Josten
Testing.. Geert Josten wrote: I take the challenge to make this work in XSL. Just give me about 15 min. :-) David wrote: Geert Josten wrote: Hi David, Actually, it has. Sandor suggested to generate an XSL using the xpaths you want to match as input. As long as not every requests needs

Re: multiple xpaths

2005-10-04 Thread Geert Josten
David, Fidling around a bit brought me to the XSL you will find below. Some notes though. Particularly the part that multiple values have to be added to the same attribute makes it quite difficult. I have for convenience chosen to add separate class elements to the img content. You could

Re: multiple xpaths

2005-10-04 Thread David
Its a very interesting way of doing it but I am worried about speed. I had an idea VERY similar to it but am worried about speed. Yours would probably be faster than what i was thinking. I will consider this as an possible solution. Even if it isn't the best solution I could always do this for

Re: multiple xpaths

2005-10-04 Thread Geert Josten
If you have a working version of your XSL, send me a copy. I might find a moment to look for some speed improvements.. Cheers, Geert David wrote: Its a very interesting way of doing it but I am worried about speed. I had an idea VERY similar to it but am worried about speed. Yours would

Re: multiple xpaths

2005-10-03 Thread Christoph Hermann
Am Sonntag, 2. Oktober 2005 21:04 schrieb Sandor Spruit: Hello, Don't know about the best way, but I had a similar problem recently: I wanted to apply a transformation to specific elements, pointed to by an XPath expression. The basic problem was that XSLT will not allow a variable where it

Re: multiple xpaths

2005-10-03 Thread Sandor Spruit
Christoph Hermann wrote: Am Sonntag, 2. Oktober 2005 21:04 schrieb Sandor Spruit: Hello, Don't know about the best way, but I had a similar problem recently: I wanted to apply a transformation to specific elements, pointed to by an XPath expression. The basic problem was that XSLT will not

Re: multiple xpaths

2005-10-03 Thread Sandor Spruit
Sandor Spruit wrote: Christoph Hermann wrote: Am Sonntag, 2. Oktober 2005 21:04 schrieb Sandor Spruit: [description of dynamic stylesheet idea snipped] Wouldn't it be _much_ easier to use xalan extensions for this purpose? xsl:stylesheet version=1.0

Re: multiple xpaths

2005-10-03 Thread Geert Josten
Was does work is the use of the extension in calls to xsl:apply-templates, but that is not what I want. It will help iff you want to apply a template to one specific XPath. What I need is to copy the entire XML tree using a regular xsl:copy, with some extra highlighting tags inserted for the

Re: multiple xpaths

2005-10-03 Thread Sandor Spruit
Geert Josten wrote: Was does work is the use of the extension in calls to xsl:apply-templates, but that is not what I want. It will help iff you want to apply a template to one specific XPath. What I need is to copy the entire XML tree using a regular xsl:copy, with some extra highlighting

RE: multiple xpaths

2005-10-03 Thread Ard Schrijvers
-Original Message- From: Sandor Spruit [mailto:[EMAIL PROTECTED] Posted At: maandag 3 oktober 2005 14:31 Posted To: Cocoon User List Conversation: multiple xpaths Subject: Re: multiple xpaths Geert Josten wrote: Was does work is the use of the extension in calls to xsl:apply-templates

Re: multiple xpaths

2005-10-03 Thread David
David wrote: I am writing a cocoon transformer and need to know when any of multiple xpaths match. I'm sure there must be a be a more efficient way then converting it to a DOM document and then running each xpath to get the nodelist of each. What is the best way to do this? Thanks, David

Re: multiple xpaths

2005-10-02 Thread Sandor Spruit
David wrote: I am writing a cocoon transformer and need to know when any of multiple xpaths match. I'm sure there must be a be a more efficient way then converting it to a DOM document and then running each xpath to get the nodelist of each. Don't know about the best way, but I had

multiple xpaths

2005-10-01 Thread David
I am writing a cocoon transformer and need to know when any of multiple xpaths match. I'm sure there must be a be a more efficient way then converting it to a DOM document and then running each xpath to get the nodelist of each. What is the best way to do this? Thanks, David

Re: multiple xpaths in XPathDirecory

2004-01-14 Thread rufio
on Tue, 13 Jan 2004 23:02:19 +0100 [EMAIL PROTECTED] wrote: Ah, wild guess: the XPathDirectoryGenerator uses @name to give the original filename. No, it doesn't, but this is also option - change filenames I was also unable to get xpath1|xpath2 working when both expressions contained

RE: multiple xpaths in XPathDirecory

2004-01-13 Thread H . vanderLinden
PROTECTED] Subject: multiple xpaths in XPathDirecory Hi I'm trying to get 2 informations from xml files with XPathDirectory generator: /page/@name and /page/@category but I found that I can't use xpath parameter more than once (thanx avalon). I also found that the xpath parameter can