xsl-list
[Top] [All Lists]

Re: Using keys on a tree from document()

2005-03-04 16:39:41
Yes, that was my case. I have a 

<xsl:apply-templates select="document('....')/Process/>

and then is inside the template that matches Process that i use the keys.

Thanks for your answer.


On Fri, 4 Mar 2005 21:17:40 -0000, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:
I just read some posts in the archive, but they are about comparing
keys in the source document with keys in external documents from
document function.

However, in my case, i do not have a source document, just the one i'm
getting thru document(), and i'll like to use keys on that to find
some related nodes from that document, just like if it was the source
docuement?

Is this possible? If yes, how?

It is possible, and it's fairly automatic.

When you call key('k', 'banana'), the system searches for all nodes that:

1. match the match pattern of key 'k'
2. have the 'use' value = 'banana'
3. are in the same document as the context node

So if the context node is in document('abc.xml'), that's the one that is
searched.

Michael Kay
http://www.saxonica.com/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>