|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Element creation
> From: David Pratt [mailto:dave.pratt@xxxxxxxxxxxxxxxxx] > Sent: Tuesday, December 03, 2002 1:10 PM > Subject: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








