Subject: Re: [xsl] reading link value from external xml file with variable From: Jarkko.Moilanen@xxxxxx Date: Mon, 04 Nov 2002 09:01:19 +0200 (EET) |
Lainaus Joerg Heinicke <joerg.heinicke@xxxxxx>: > Hello Jarkko, > > you must use the extension function evaluate() for it. There is no other > > possibility to evaluate an XPath expression dynamically. > > Furthermore you have to process the string with a recursive template, so > > that you have access to the substrings So I can not use <a href="{xalan:evaluate($monthdec)}"> ? Where $monthdec points to external variable, which reads the final value from a external xml file. Cheers, Jarkko > > 1. /cbroker/XMLServ/XMLHan?command=list&period= > 2. {/XDocList/@view} => evaluate() > 3. &count= > 4. {/XDocList/@offset} => evaluate() > 5. &orderby=date&status=1 > > Regards, > > Joerg > > Jarkko.Moilanen@xxxxxx wrote: > > Hi! > > > > I have a situation which I encountered this morning > > and I got stuck with it. > > > > I have a main xslt file into which I import other xslt files and > > data from several xml files. > > > > The problem is generic linkvalue in the result html file. > > In the main xslt file i have: > > > > <xsl:stylesheet version="1.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > > > <xsl:import href="Sort_Notunsigned.xml" /> > > <xsl:import href="recent.xsl" /> > > <xsl:import href="statistics.xsl" /> > > <xsl:import href="viewcommands.xsl" /> > > <xsl:import href="sortcommands.xsl" /> > > > > Here the line where I import Sort_Notunsigned.xml contains > > lines like this: > > > > <sortbydateasc>/cbroker/XMLServ/XMLHan?command=list& > > period={/XDocList/@view}&count={/XDocList/@offset}& > > orderby=date&status=1 > > </sortbydateasc> > > > > As you can see, it is a linkvalue /command to be sended on click > > > > The value of <sortbydateasc> is called by a variable in > > sortcommands.xsl (which is imported to main xslt)like this: > > > > <xsl:variable name="dateasc"> > > <xsl:value-of > > > select="document('commands.xml')/xslt/notunsigned/sorting/sortbydateasc"/> > > </xsl:variable> > > > > No the problem is obvious. When the value comes from xml file, > > the part where it should get {/XDocList/@view} from the input xml > file, > > it does not do it. Same thing with {/XDocList/@offset}. > > > > I think it would be possible to do it if the commands.xml would be > > commands.xsl? > > > > Reason why I have separated the transformation into several > > files, is that I want to make it easier to maintain and > > change the commmand values in one place and have the affect > > in several places. > > > > Cheers > > Jarkko > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > **************************************************************** Jarkko Moilanen "Erehtyminen on inhimillista, Researcher/ ITCM mutta todella suuret mokat jm60697@xxxxxx vaativat tietokoneen käyttöä." www.uta.fi/~jm60697 GSM: +358 50 3766 927 **************************************************************** * ITCM | Information Technology and Crisis Management * http://www.itcm.org **************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] min & max of numeric sub-, Johan von Boisman | Thread | Re: [xsl] reading link value from e, Joerg Heinicke |
Re: [xsl] min & max of numeric sub-, Jarkko . Moilanen | Date | RE: [xsl] re-printing xml, Jarno . Elovirta |
Month |