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

Xpath as variable, then processing it

Subject: Xpath as variable, then processing it
From: <michella@xxxxxxx>
Date: Fri, 31 Dec 2004 12:38:32 +0100
xpath disable output escaping
Hi all,

I have a little question :

I have a small XML Data containing in one of its field an Xpath (as
text) which should be used in an XSL-T for querying data in another XML
using this XPath. The following XSL handles it as a variable.

<Classes>
	<Class>
		<Architecture name="Application" abr="AA">
			<xsl_File name="App_Apt_Apx_Applications"

file="App_Apt_Apx_Applications.xsl"

XPath="/Classes/Class/SADefinition[starts-with(@SAObjName,'app_') or
starts-with(@SAObjName,'apx_') or starts-with(@SAObjName,'apt_')]"/>
(...)

Then, the XSL file looks as follow :

<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:variable name="mainXML_node"
select="document('../XML/PM-EA-AA_IA_PA_TA.xml')"/>     (The main XML)
	<xsl:output method="html" version="1.0" encoding="UTF-16"
indent="yes"/>
	<xsl:template match="/">
		<xsl:result-document
href="../TCL/Temp/TCL_Data_Config.tmp">
			<xsl:value-of disable-output-escaping="yes"
select="'{'"/>
			<xsl:for-each-group
select="/Classes/Class/Architecture" group-by="@name">
				<xsl:sort select="@name"/>
				<xsl:value-of
disable-output-escaping="yes" select="concat('{',@name,' ')"/>
				<xsl:for-each-group select="xsl_File"
group-by="@name">
					<xsl:sort select="@name"/>
					<xsl:variable name="path"
select="@XPath"/>
					<xsl:value-of
disable-output-escaping="yes" select="concat('{',@name,' ')"/>
					<xsl:for-each
select="$mainXML_node">			(Here is the problem)
						<xsl:for-each-group
select="$path" group-by="@SAObjName">
							<xsl:sort
select="@SAObjName"/>
(...)



I hope the upon the text is correctly indented by your mail browser.

Unfortunately, it won't work. Have anyone got an idea on how to solve my
problem?

Best regards

Lawrence

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.