cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S.Ramaswamy" <srsw...@giasdl01.vsnl.net.in>
Subject Re: Possible bug?
Date Wed, 29 Dec 1999 07:18:36 GMT
James & Sue Ann Birchfield wrote:
> 
> This doesn't work
> <xsl:variable name="height" select="2"/>
> <xsl:value-of select="$height"/>

Try 

<xsl:variable name="height" select="'2'"/>

Otherwise xslt processor takes 2 as an element tag

> 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
> > > >
> >

-- 
==--==--==--==--==--==--==--==--==--==--==--==--==--==
S.Ramaswamy
Matrix Infotech Syndicate
D-7, Poorti, Vikaspuri, New Delhi, 110018, India
PHONE:    +91-11-5610050,   FAX: +91-11-5535103  
WEB         http://MatrixInfotech.HyperMart.Net
==--==--==--==--==--==--==--==--==--==--==--==--==--==


Mime
View raw message