xsl-list
[Top] [All Lists]

AW: AW: Xpath as variable - bis

2005-01-03 04:01:10
Jep, thanks for your help...

Actually, the "saxon:evaluate-node($xpath)" won't work properly, but the simple 
"saxon:evaluate($xpath) is successfull.

Thanks ;-)


-----Ursprüngliche Nachricht-----
Von: Geert Josten [mailto:Geert(_dot_)Josten(_at_)daidalos(_dot_)nl] 
Gesendet: Montag, 3. Januar 2005 11:48
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: Re: AW: [xsl] Xpath as variable - bis


Hi there,

Overlooked the fact that you were using concat. Sorry.

But I think the concat is not used properly. From you comment below, I 
understand that you try to 
concatenate two parts of an XPath expression and to evaluate that. In you code 
you are actually 
retrieving the document and combining the string value of the full document 
with the second part of 
the XPath expression:

        <xsl:variable name="mainXML_node" 
select="document('../XML/PM-EA-AA_IA_PA_TA.xml')"/>
        (...)
        <xsl:for-each-group select="concat($mainXML_node,$path)" 
group-by="@SAObjName">
        (...)

You probably want to do something like:

<xsl:variable name="xpath">
   <xsl:text>document('../XML/PM-EA-AA_IA_PA_TA.xml')</xsl:text>
   <xsl:value-of select="@XPath" />
</xsl:variable>

<xsl:for-each-group select="saxon:evaluate-to-node($xpath)" ... >

Cheers,
Geert

Hello,

No, the /Classes/Clas... Found within the @Xpath attribute is simply a 
string. The idea is to find a way to concatenate a root node and this xpath 
string, then evaluate it. -> document(Xxx.xml)/Classes/Class/...
                                              (     is a node       )(    is 
a string    )  --> (must be a nodeset)

-----Ursprüngliche Nachricht-----
Von: Geert Josten [mailto:Geert(_dot_)Josten(_at_)daidalos(_dot_)nl] 
Gesendet: Montag, 3. Januar 2005 11:31
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: Re: [xsl] Xpath as variable - bis



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


I suspect that the path '/Classes/..' is not evaluated with the external 
document as context, but 
the one passed from source of command-line. But I'm not a Saxon expert.

Have you tried relative paths?

Cheers,
Geert

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




-- 
Geert(_dot_)Josten(_at_)Daidalos(_dot_)nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>
  • AW: AW: Xpath as variable - bis, michella <=