xsl-list
[Top] [All Lists]

RE: [xsl] template match based on external document

2006-08-23 02:13:30
I know this code is wrong but it illustrates my thinking at 
the moment:
---
<xsl:template match="g[(_at_)id=document('doc.xml')//object(_at_)id]">

Change it to

<xsl:template match="g[(_at_)id=document('doc.xml')//object/@id]">

and it's fine (though probably slow).

  <xsl:value-of select="document('doc.xml')//object(_at_)type"/>

That should probably be something like

 <xsl:value-of
select="document('doc.xml')//object[(_at_)id=current()/@id]/@type"/>

But you may be better off using keys.

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>
--~--

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