Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2008, 10:41 PM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error with XSLT

Am getting error as
E [Saxon6.5.5] No character data is allowed between top-level elements
When i use Oxygen XML editor....
My xsl file starts like this
<?xml version="1.0" encoding="utf-8" ?>
- <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">

- <xsl:template match="List">
  - <xsl:variable name="View">

  <xsl:value-of select="param/View" />
  </xsl:variable>
- <div class="list">
- <h3>
  <xsl:value-of select="$View" />
  </h3>
-[list]
- <xsl:for-each select="View">
- <li>
- <a target="_blank">
- <xsl:attribute name="href">

  <xsl:value-of select="substring-before(URLwMenu,',')" />
  </xsl:attribute>
  <xsl:value-of select="substring-after(URLwMenu,',')" />
  </a>
  </li>
  </xsl:for-each>
  </ul>
  </div>
</xsl:template>

My Xml file format is
<List>
   <view>
   </View>
   <view>
   </view>
   .
   .
   .
</List>



please help to solve this problem


 
Old July 28th, 2008, 02:14 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

If those dashes (-) are in the file then that's what's illegal.

--

Joe (Microsoft MVP - XML)
 
Old July 28th, 2008, 03:53 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If you're using version="2.0" in your stylesheet then you should really be using Saxon 9.x rather than Saxon 6.x. You might find that Saxon 9.x gives you a better error message, pointing you to where the offending content appears. As Joe says, if the hyphens are actually there in your source then that is the problem.

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT - xs:dateTime error mess. ajuthani XSLT 3 August 26th, 2008 03:39 PM
XSLT Decleration Error. lafilip XSLT 8 July 20th, 2006 04:33 PM
XSLT -XPATH Error xslspy XSLT 1 October 27th, 2005 03:24 AM
XSLT Template error again bmains XSLT 4 December 19th, 2003 11:17 AM
How to generate an Error message from XSLT srini XSLT 2 December 16th, 2003 10:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.