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 November 11th, 2009, 12:46 PM
Registered User
 
Join Date: Oct 2009
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem with template

Hello Everyone,

I getting this error 'Cannot validate <reports>: no element declaration available'

'reports' is the top level element in the XML document.

on the bewlo line of code :

Code:
<xsl:apply-templates select="document(Reports.xml')/./*//sheets[@date=$date]">

</xsl:apply-templates>
I have created XML Schema document as well is it is showing document is valid in Oxygen editor.

but when I am debuggind XSLT then it is giving this error.

Thanks

UTYK
 
Old November 11th, 2009, 12:59 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Am I right in thinking that is a Saxon error message?

Where are you expecting Saxon to find the schema? Is it imported into the stylesheet, referenced from the instance document, specified on the command line, or what?

The message means that among all the schema components that Saxon knows about, there is no element declaration for the name "reports".

It could also be a namespace issue: there might be a declaration for local name "reports" in a different namespace.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old November 11th, 2009, 01:26 PM
Registered User
 
Join Date: Oct 2009
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you for your reply Michael.

No i am not importing Schema in Stylesheet, it is a referenced from the instance document.

But when i am using Saxon 6.5 then its not giving me this error. Because I am using some 2.0 function in XSLT for that i have to use Saxon 9.
 
Old November 11th, 2009, 01:45 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Please raise this on the Saxon help mailing list or forum (reachable via the Saxon project on sourceforge.net). Please explain in more detail exactly what you are doing: which version/edition of the software, how you invoked it (e.g. from the command line, what the xsi:schema-location looks like, what the schema looks like, etc.)
__________________
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
Problem with template nelly78 XSLT 14 November 11th, 2009 01:23 PM
Problem with template Hari7 XSLT 3 November 3rd, 2009 01:26 PM
Problem with XSLT template nelly78 XML 3 October 29th, 2009 02:14 PM
xsl:template problem mickhughes XSLT 1 August 16th, 2007 08:40 AM
Datagrid template column problem sonurijs ASP.NET 1.0 and 1.1 Professional 1 September 27th, 2005 12:53 PM





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