[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: template match based on external document

Subject: RE: template match based on external document
From: "Lincoln" <lincoln.mitchell@xxxxxxxxxx>
Date: Fri, 25 Aug 2006 11:07:09 +0800
xsl external document slow
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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.