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

xsl:element will not create an output element, in any

Subject: xsl:element will not create an output element, in any context
From: N David Brown <orieldave@xxxxxxxxxxxxxx>
Date: Thu, 31 May 2007 11:55:51 +0000
 xsl:element will not create an output element
Hi guys,

It seems that, no matter what the context of an 'xsl:element' element,
no element is output for me. I have performed tests on different
browsers (ff, ie) on different systems, and still get no output!

An example - this W3C-ripped example produces no 'singer' elements for
me in the output:

http://www.w3schools.com/xsl/xsl_transformation.asp

My own code looks like this:

XML:

   <?xml version="1.0" encoding="ISO-8859-1"?>
   <root>rootname
      <dir>dir1
         <file>file1</file>
         <file>file2</file>
      </dir>
      <dir>dir2
         <file>file3</file>
      </dir>
   </root>

XSL:

   <?xml version="1.0" encoding="ISO-8859-1"?>
   <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:template match="*">
      <xsl:element name="test">
         <xsl:apply-templates/>
      </xsl:element>
   </xsl:template>

</xsl:stylesheet>

(my XSL is, unsurprisingly, much different from this in reality but I'm
using this simple stylesheet as an easy test platform)

--> The output from my own code is nothing, in this case, or if I have a
xsl:value-of selection within the 'test' element, then those values
would be output, but no surrounding <test></test>.

My transformations were being done server-side by some PHP I'd coded,
but I now directly link the XSL stylesheet to the XML file and then load
the XML file in the browser, to facilitate this debugging and ensure the
PHP isn't causing the problem.

I've no idea why this is happening, and have been attempting (and
failing) to fix it for about 3 days now in my spare time. Any
suggestions would be really appreciated!

Cheers.

- Dave

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.