Re: [xsl] build a select clause or dynamic URI's

Subject: Re: [xsl] build a select clause or dynamic URI's
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Nov 2004 12:34:59 -0500
At 07:50 PM 11/9/2004, Andy wrote:
David M Petersen swiftly responded
this knowledge I have my doubts that its going to be all that helpful to you as it doesnt seem that you want to reference the actual stylesheet itself...

correct - I want to reference elsewhere in the current source document which is not apparently possible. (Not being able to refer to the document makes vague sense - I suspect it is possible for it to be an infoset not actually a physical document, not the same as referring to "other" documents.)


The only real chance you have of being able to do any sort of pseudo dynamic XPath expression is if, for example, there is only one ancestor gml:position for any given element.

there is in this case but I'm trying to solve some common patterns.


Oh well, enough ambition for the budget I have on this project, a generic solution to XSLT processing of schema-driven, ref-all-over-the-place documents will have to wait :-(

It *is* ambitious, since XSLT engines aren't built to do this (as M.D. says).


Much of the reason this is an obscure requirement (or has been for the most part) is that the conventional way of expressing cross-references in XML has been to label target elements with unique identifiers, and then refer to those. XSLT gives the id() and key() functions to make this really easy.

Some XSLT processors, such as Saxon, provide an "eval()" function or equivalent to get around this limitation in XSLT. This is way better (since the engine already has to evaluate XPaths, just not dynamically) than trying to implement XPath in XSLT itself.

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread