[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Simple XSL but having problems

Subject: RE: Simple XSL but having problems
From: cknell@xxxxxxxxxx
Date: Tue, 11 May 2004 12:15:33 -0400
RE:  Simple XSL but having problems
It isn't clear what you expect your output to look like. If it is this:

   test1::test2;;:|*|:
	
   test3::test4;;:|*|:

Then then replace the contents of your stylesheet with these two templates:

	<xsl:template match="/a">
		<xsl:apply-templates />
	</xsl:template>

	<xsl:template match="b">
		<xsl:value-of select="c1" />::<xsl:value-of select="c2"/>;;:|*|:
	</xsl:template>

If that isn't the output you want, then submit an example.
By the way, the bare <b> in the middle of your document makes it not a well-formed XML document. You will have to clean up the input before anything will work.

-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Dylan Barber <dylan.barber@xxxxxxxxxxxxx>
Sent:     Tue, 11 May 2004 11:02:22 -0500 (GMT-05:00)
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:   Simple XSL but having problems

Here is my xml layout

<a>
   <b>
       <c1>test1</c1>
       <c2>test2</c2>
   </b>
   <b>
   <b>
       <c1>test3</c1>
       <c2>test4</c2>
   </b>
</a>

and i want to show c1 and c2 so i have this 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
			<xsl:for-each select="a/b">
				<xsl:value-of select="c1"/>
				::
				<xsl:value-of select="c2"/>
				;;
			</xsl:for-each>:|*|:
	</xsl:template>
</xsl:stylesheet>  


however all i get is :|*|:

what did i do wrong (please no rebukes I am trying to understand this and I think this structure should work its easy enough)

Thanks !!!!!

---------------------------------------------------------------------------------------------
Dylan Barber

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.