Subject: RE: [xsl] Output a link in a transformation to html From: Nate Austin <naustin@xxxxxxxxxx> Date: Thu, 31 May 2001 18:13:42 -0500 |
Argh! Sorry, long day... <xsl:attribute> doesn't have a 'select' attribute. The first example SHOULD be as follows: <h3>Web: <a> <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute> <xsl:value-of select="."/></a></h3> Sorry if I caused any confusion... -Nate naustin@xxxxxxxxxx -----Original Message----- From: Nate Austin Sent: Thursday, May 31, 2001 6:08 PM To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Cc: 'luare@xxxxxxxxxx' Subject: RE: [xsl] Output a link in a transformation to html Luare- XSLT needs to be well-formed XML. I'd suggest doing some reading on exactly what that means. http://www.w3.org/XML/ should provide you with a few links for starters. The reason that is not well-formed is because <xsl:value-of/> is an element. Since HREF is an attribute, it cannot have complex (element) content. It also must enclose its content in " or '. The solution to your problem would look something like this: <h3>Web: <a><xsl:attribute name="href" select="."/><xsl:value-of select="."/></a></h3> or (using an Attribute Value Template): <h3>Web: <a href="{.}"><xsl:value-of select="."/></a></h3> Hope that helps, Nate naustin@xxxxxxxxxx >Date: Wed, 31 May 2000 21:37:07 +0200 >From: "Luare" <luare@xxxxxxxxxx> >Subject: [xsl] Output a link in a transformation to html > > Hi, > >I am doing a transformation from xml to html. >This example is not well-formed, why? > > <H3>Web: <A HREF= <xsl:value-of select="."/>> <xsl:value-of select="."/> ></A></H3> > >The expresion <xsl:value-of select="."/> return a string, doesn't it? > >If I put "<xsl:value-of select="."/>" >or string(<xsl:value-of select="."/>) >the error is the same. > >It seem a tipical error, but I am a beginner. > >Thanks XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Output a link in a transf, Nate Austin | Thread | [xsl] XML -> XML using XSL,DTD XAL, Thushara Perera |
RE: [xsl] Output a link in a transf, Nate Austin | Date | [xsl] Need better ways to do this.., Sudhir Malhotra |
Month |