xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re : [xsl] How to handle dynamic XPath


Subject: [xsl] Re : [xsl] How to handle dynamic XPath
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Sun, 12 Apr 2009 19:52:19 +0000 (GMT)

fred@xxxxxxxxxxxxx wrote:

  Hi,

> <xsl:with-param name="instance.path"
> select="concat($instance.path,'/',$element.prefix,':',@name)"
> />

  You cannot evaluate an XPath expression supplied as a string in plain XSLT.
You can use extensions though for that purpose (of your own or existing one.)
I haven't looked deeply into your problem, but I'd say I'd rather user
either:

  1/ maintaining a pointer in the instance and selecting its correct
child(ren) using local-name() and namespace-uri() for each step;

  2/ or using a meta-stylesheet: your stylesheet generates another XSLT
stylesheet that contains the XPath expressions (you "compile" the schema to
the equivalent stylesheet) and you apply this stylesheet to the instance in a
second execution.

  Regards,

--
Florent Georges
http://www.fgeorges.org/


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor