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

RE: evaluate

Subject: RE: evaluate
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 23 Jun 2003 19:23:06 +0100
xsl evaluate
There are a few specialized cases where saxon:assign can be really
useful, for example in instrumenting a stylesheet to count how often
different templates are executed. You are abusing it, to the extent that
your stylesheet cannot really be said to be written in XSLT at all. As
far as I can see from your code sample, there is absolutely no reason to
be using this construct.

Now I'm trying to work out what you're trying to do. 

(a) the title of your email is called "evaluate". Has this got anything
to do with your problem, and if so what?

(b) the code you show us seems to be intended to produce a sequence of
<group> elements, each containing a number of <a> elements.

(c) the output you say you want to produce consists of a string in the
form of a path expression. This appears to bear no discernable
relationship to your code.

Start at the beginning. What is your input, and what is your desired
output, and how do they relate to each other? Usually I then ask people
to show us their code, so that we can see where they are having
problems. But it seems your code is not likely to be a good place to

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Michael Paffrath
> Sent: 23 June 2003 15:59
> To: XSL List
> Subject:  evaluate
> hi!
> i am new to xsl and i have a little problem ...
> while generating a xml-file with saxon i want to put an 
> xpath-expression into the doc. i can assign values, but i 
> cant get any xpath ...
> here is some code:
> <xsl:for-each select="document(concat($xml_path, $area, 
> '/groups.xml'))/groups/group[descendant::a]">
> 	<xsl:choose>
> 		<xsl:when test="@area">
> 			<saxon:assign name="area_test" select="@area"/>
> 			<saxon:assign name="title" 
> select="document(concat($xml_path,
> 'definitions.xml'))/definitions/global/areas/element[@name = 
> $area_test]/@translation"/>
> 		</xsl:when>
> 		<xsl:otherwise>
> 			<saxon:assign name="title" select="@title"/>
> 		</xsl:otherwise>
> 	</xsl:choose>
> 	<saxon:assign name="templateName" 
> select="descendant::template/@name"/>
> 	<group ID="{@ID}" title="{$title}" 
> template="temp_{$templateName}">
> 		<xsl:for-each select="descendant::a">
> 			<saxon:assign name="href" select="@href"/>
> 			<saxon:assign name="hrefinhalt" select="."/>
> 			<saxon:assign name="hreftitle" 
> select="document(concat($xml_path,
> 'structure.xml'))/descendant::*[@ID = $href]/@title"/>
> 			<a href="{$href}" title="{$hreftitle}" 
> contents="{$hrefinhalt}"/>
> 		</xsl:for-each>
> 	</group>
> </xsl:for-each>
> i would like to get the xpath for 'hreftitle'
> => in this form:  /structure[1]/group[2]/group[4]/group[3]/target[3]
> hope u can help me - im almost desperate ...
> Michael Paffrath
> fatmedia - agentur für interaktive medien
> Schillerstraße 6
> 50968 Köln
> Tel. 0221 - 660 36 63
> Fax. 0221 - 276 03 98
> http://www.fatmedia.de/
> eMail: paffrath@xxxxxxxxxxx
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.