xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RAHMAN,ABDUR (HP-Sunnyvale,ex1)" <abdur_rah...@hp.com>
Subject XERCES 2 availability
Date Mon, 12 Mar 2001 22:06:56 GMT
We want to use Xerces 2 later on when it becomes available due to it's
advanced parsing capability. Does anyone know when will Xerces 2 be
available? 

Thanks!

Abdur Rahman
Hewlett-Packard

P.S.- I'm not currently in the mailing list. use my email address to send me
mail.

-----Original Message-----
From: Samson, Lyndon [IT] [mailto:lyndon.samson@ssmb.com]
Sent: Monday, February 26, 2001 2:01 AM
To: 'general@xml.apache.org'
Subject: XSLT Interesting behaviour


Hi Listers

I want to control the output of matches based on an order tag. Something
like this;

Input

<allthings>
  <thing id='1'>Thing1</thing>
  <thing id='2'>Thing2</thing>
  <thing id='3'>Thing3</thing>

  <orderofthings>
    <thing>2</thing>
    <thing>1</thing>
    <thing>3</thing>
  </orderofthings>

</allthings>

Template 

<xsl:template match="/allthings/orderofthings/*">
  <xsl:variable name="thisval"><xsl:value-of select="."/></xsl:variable>
  <xsl:apply-templates select="/allthings/thing[@id=$thisval]"/>
</xsl:template>

Output

Thing2
Thing1
Thing3

This works but I would have thought that the best way to define the template
would be;

<xsl:template match="/allthings/orderofthings/*">
  <xsl:apply-templates select="/allthings/thing[@id=text(.)]"/>
</xsl:template>

But this doesn't seem to work, what have I missed? Can I not use functions
in expressions?



thanks
l

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message