Login 
 
 Pref   Your subscriptions   Home   Help 
users@ml.mod-xslt2.com
mod-xslt2 - Users Mailing List
   
 
List info
 
 
 
Subscribe
 
 
Unsubscribe
 
 
Archive
 
 
Post
 



Advanced search
2004 01 02 03 04 05 06 07 08 09 10 11 12
2005 01 02 03 04 05 06 07 08 09 10 11 12
2006 01 02 03 04 05 06 07 08 09 10 11 12
2007 01 02 03 04 05 06 07 08 09 10 11 12
2008 01 02 03 04 05 06 07 08 09 10 11 12
2010 01 02 03 04 05 06 07 08 09 10 11 12
2011 01 02 03 04 05 06 07 08 09 10 11 12

       Chronological   next            Thread   next  

new to XSLT transformation, attributes and {}? ggerard
  • From: ggerard@xxxxxxxxxxx
  • To: users@xxxxxxxxxxxxxxxx
  • Subject: new to XSLT transformation, attributes and {}?
  • Date: Tue, 8 Mar 2005 20:12:45 +0100 (CET)


  • I am changing my modperl modules to provide just xml code that has to be
    translated to html by mod-xslt.
    Now i'm just learning xslt and testing some initial code, but i've found some
    problems i would say they wouldn't exist, but i might be wrong.

    ---------------------------------
    The xml code:
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <?xml-stylesheet type="text/xsl" href="blogum2.xsl" ?>
    <blogum>
    <main_comment href="hola">Some code</main_comment>
    </blogum>


    ---------------------------------
    The xslt code:
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
    <xsl:output method="html" />

    <xsl:template match="/blogum">

    Code generated here<br />
    <xsl:value-of select="main_comment" /><br />
    {main_comment}<br />
    {main_comment@href}<br />
    <xsl:value-of select="main_comment@href" /><br />

    </xsl:template>
    </xsl:stylesheet>

    ----------------------
    It gives error due to the sentence
    <xsl:value-of select="main_comment@href" />

    If i erase it, the sentences
    {main_comment}<br />
    {main_comment@href}<br />
    are not parsed and are printed literally.

    What am i doing wrong? In my opinion this code should work, so i don't know
    what happend.
    Fist sentence
    <xsl:value-of select="main_comment" /><br />
    works without problems.

    Thanks!

      Powered by Sympa