[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: parameters in XSLT 2.0
On Jun 8, 2005, at 4:36 PM, Michael Kay wrote:
For example, first I have this variable to [expletive deleted] in outside data: The bibrecord variable that's getting copied there typically draws in documents via document() over http (with a flatfile option as well) with stuff like: <xsl:copy-of select="doc(concat("http://localhost:8080/exist/servlet/db/mods? ", "_query=declare%20namespace%20mods=%22http://www.loc.gov/mods/ v3%22;", "%20for%20$citekey%20in%20", $citekeys, "%20return%20//mods:mods[@ID=$citekey]&_howmany=-1"))"/> So in this case I'm pulling in the data from using XQuery to the eXist REST interface. I didn't know about sequences when I wrote it originally, and am not sure even now if I can do this: <xsl:variable name="bibrecord" as="element()+"> <xsl:sequence select="doc(concat("http://localhost:8080/exist/servlet/db/mods? ", "_query=declare%20namespace%20mods=%22http://www.loc.gov/mods/ v3%22;", "%20for%20$citekey%20in%20", $citekeys, "%20return%20//mods:mods[@ID=$citekey]&_howmany=-1"))"/> </xsl:variable> Possibly: I can't see what the apply-templates calls are doing, so it's hard OK. Those templates are grouping/sorting, and in one case also adding nodes. I reorganized a few of those templates today to just pass some (tunnel) parameters though, in part because it simplified the code. If I understand right, so long as the node content doesn't change and I'm just grouping and/or sorting and passing parameters, then I don't need to use a temporary tree. Right? Two things are worth remembering about performance engineering: OK, thanks. Bruce
|
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
|