Subject: RE: [xsl] Element creation From: "Martinez, Brian" <brian.martinez@xxxxxxxx> Date: Tue, 3 Dec 2002 13:46:22 -0700 |
> From: David Pratt [mailto:dave.pratt@xxxxxxxxxxxxxxxxx] > Sent: Tuesday, December 03, 2002 1:10 PM > Subject: [xsl] Element creation > > > I have reviewed tutorials and hoping someone can point out why the > style_name element is not being created and how to correct this. Help > appreciated. Thanks. > > [ XML snipped ] Perhaps it's a typo, but I noticed your close document tag was missing its /. (I can't imagine that is the source of your problem--your parser would balk at it before the stylesheet ever saw it.) > XSL: > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0"> > <xsl:output method="xml"/> > <xsl:template match="/"> > <article> > <xsl:for-each select="/document/para"> > <xsl:element name="{style_name}"> > <xsl:value-of select="para_content"/> > </xsl:element> > </xsl:for-each> > </article> > </xsl:template> > </xsl:stylesheet> > > Am looking for this result: > > <article> > <title>This is the title.</title> > <body>This is the body.</body> > </article> I applied your stylesheet using MSXML 4.0, and I got the desired result. What processor are you using? | brian martinez brian.martinez@xxxxxxxx | | senior gui programmer 303.708.7248 | | trip network, inc. fax 303.790.9350 | | 6436 s. racine cir. englewood, co 80111 | | http://www.cheaptickets.com/ http://www.trip.com/ | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Element creation, Zarella Rendon | Thread | Re: [xsl] Element creation, David Pratt |
RE: [xsl] Element creation, Zarella Rendon | Date | Re: [xsl] special character, Mike Brown |
Month |