cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James & Sue Ann Birchfield" <jsrbi...@home.com>
Subject RE: Possible bug?
Date Tue, 28 Dec 1999 22:00:38 GMT
This doesn't work
<xsl:variable name="height" select="2"/>
<xsl:value-of select="$height"/>

but this does:
<xsl:variable name="height">2</xsl:variable>
<xsl:value-of select="$height"/>

This is why I think it is in the way the doc is
processed.  But done this way, I can't do any
expressions like:
<xsl:variable name="height">hits*2</xsl:variable>

It looks like the xslt processor changed between 1.5 and 1.6.
I am not set up to compile 1.6 at the moment, but I may
need to to start testing some of the new features being put
in.  Has anyone ever ran into this before we go chasing
this down?

=====================================
James Birchfield
Chief Technology Officer
jmbirchfield@proteus-technologies.com
http://www.proteus-technologies.com
=====================================

> -----Original Message-----
> From: Brett McLaughlin [mailto:bmclaugh@algx.net]
> Sent: Tuesday, December 28, 1999 4:56 PM
> To: cocoon-dev@xml.apache.org
> Subject: Re: Possible bug?
> 
> 
> 
> 
> James & Sue Ann Birchfield wrote:
> > 
> > Yes, the keyboard at work is atrocious when I am on it...:)
> > =====================================
> > James Birchfield
> > Chief Technology Officer
> > jmbirchfield@proteus-technologies.com
> > http://www.proteus-technologies.com
> > =====================================
> > 
> > > -----Original Message-----
> > > From: Brett McLaughlin [mailto:bmclaugh@algx.net]
> > > Sent: Tuesday, December 28, 1999 3:30 PM
> > > To: cocoon-dev@xml.apache.org
> > > Subject: Re: Possible bug?
> > >
> > >
> > >
> > >
> > > jsrbirch@netmail.home.com wrote:
> > > >
> > > > I am trying the following, and it doesn't seem to follow the
> > > reomendation:
> > > >
> > > > -XML-
> > > > <hits>24</hits>
> > > >
> > > > -XSL-
> > > > <xsl:variable name="height" select="hits*.5"/>
> > > > <xsl:value-of slect="$height"/>
> 
> Maybe try:
> 
> <xsl:variable name="height" select="/hits*.5"/>
> 
> Or use the absolute path to hits.  e.g.
> 
> <root>
>  <element1>
>   <hits>24</hits>
>  </element1>
> </root>
> 
> --
> <xsl:variable name="height" select="//root/element1/hits*.5"/>
> 
> I'm also not so sure that you can mix elements and computation like
> that.  As an experiment, see if this works:
> 
> <xsl:variable name="height" select="hits"/>
> <xsl:value-of select="$height"/>
> 
> If that works, then there is a goof up in how you are doing your
> computation on hits.  If it doesn't then it has to do with getting the
> node.
> 
> -Brett
> 
> > >
> > > I'm assuming you actually have:
> > >
> > > <xsl:value-of select="$height"/>
> > >
> > > (where select is spelled correctly?)
> > >
> > > -Brett
> > >
> > > >
> > > > The above resturns empty for the value-of statement.  According
> > > to what I read in the recommendation, the above should work.  Am
> > > I understanding it correctly?  I need to do some very low level
> > > expression handling, such as the above to do proper positioning
> > > within a VRML output.  If I am off, will somebody point me the
> > > right direction?  If not, can this be looked into?  I am not sure
> > > if Cocoon uses Xalan or not.  If they do, maybe we can address it
> > > with them as well.
> > > >
> > > > Jim
> > >
> 

Mime
View raw message