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

Re: reading link value from external xml file with var

Subject: Re: reading link value from external xml file with variable
From: Jarkko Moilanen <Jarkko.Moilanen@xxxxxx>
Date: Thu, 7 Nov 2002 09:43:39 +0200 (EET)
link value
On Wed, 6 Nov 2002, Joerg Heinicke wrote:

> No, you must evaluate the substrings and concatenate the results with
> the static parts.

For some reason Xalan version 1.4 with xalan:evaluate included
seems to do evaluating it self.

I was quite suprosed when I ran these lines:

<p><b><a href="{$monthdec}"><font
color="{$NavigationArrowColor}">&lt;&lt;&lt;
</font></a></b></p>


The result is ecxatly what I wanted:
<p>
<b>
<a
href="/cbroker/XMLServ/XMLHan?command=list&amp;period=month&amp;count=dec&amp;status=1"><font
color="#FFFFFF">&lt;&lt;&lt; </font></a>
</b>
</p>

Without anything like xalan:evaluate functions used anywhere, Why?

Cheers
Jarkko


>
> Joerg
>
> > 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&amp;period=
> >>2. {/XDocList/@view}                                     => evaluate()
> >>3. &amp;count=
> >>4. {/XDocList/@offset}                                   => evaluate()
> >>5. &amp;orderby=date&amp;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&amp;
> >>>   period={/XDocList/@view}&amp;count={/XDocList/@offset}&amp;
> >>>   orderby=date&amp;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
>
>

_____________________________________________________________________

Tiedon voi hankkia kolmella tavalla:
AJATTELEMALLA, se on jalo tapa
YRITYKSEN JA EREHDYKSEN KAUTTA, se on kova tie
MATKIMALLA, se on helppo tapa
				Konfutse
_____________________________________________________________________
Jarkko Moilanen  :) www.uta.fi/~jm60697  =) puh. 040-5112113 :) Smile!!
---------------------Cogito ergo sum---------------------------------
PS. Älä varasta - hallitus vihaa kilpailua!



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


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.