|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: template match based on external document
Many thanks - works a treat! > -----Original Message----- > From: Michael Kay [mailto:mike@xxxxxxxxxxxx] > Sent: Wednesday, August 23, 2006 5:13 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: template match based on external document > > > I know this code is wrong but it illustrates my thinking at > > the moment: > > --- > > <xsl:template match="g[@id=document('doc.xml')//object@id]"> > > Change it to > > <xsl:template match="g[@id=document('doc.xml')//object/@id]"> > > and it's fine (though probably slow). > > > <xsl:value-of select="document('doc.xml')//object@type"/> > > That should probably be something like > > <xsl:value-of > select="document('doc.xml')//object[@id=current()/@id]/@type"/> > > But you may be better off using keys. > > Michael Kay > http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








