- This topic has 12 replies, 6 voices, and was last updated 19 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
posttoolMemberSeverity Description Resource In Folder Location Creation Time 2 cvc-elt.1: Cannot find the declaration of element 'xsl:stylesheet'. content.xsl Dig/WebRoot/xsl line 2 August 17, 2004 8:29:06 AM
All of my XSL files produce that error on this line
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
If I create a new file and copy paste the contents, the error disappears, but I have 40 of these files and would like to find a quicker way of removing the errors. Refresh doesn’t do it……
Riyad KallaMemberIf you right click and validate individual XSL files, does the problem disappear? What about creating a new XSL file, right clicking and validating it, does it report any errors?
You can make sure validation is on and try and rebuild your project… did that help?
Mahoney266MemberAny word on this problem? I have it too – and yes, validation is on and I have rebuilt my project and I have tried right clicking and validating individual files.
Incidentally, when right-clicking and going to New, should XSL appear as an option for a new file to be created? I don’t get any type ahead help with the XSL namespace elements, either. Be helpful if there was a little mention of XSL in the help texts.
Riyad KallaMemberMahoney can you email the file you are having trouble with to support@genuitec.com so we can see whats going on? Post never replied, so I don’t know if his problem is fixed…
Riyad KallaMemberRobert,
In response to your email and your attachment, this is what happened when I loaded up the XSL file (it worked as expected):
sidereanMemberI am using a fresh install of Eclipse 3.0.1, MyEclipse 3.8.2 (build id: 200409171200-3.8.2) with JSDK 1.4.2_03 on Windows XP.
I also have a problem with any XML files in my projects which declare a namespace (as the stylesheet element does in the XML file above). I create a test file with the xml below and the error appears on the second line:
<?xml version=”1.0″ encoding=”UTF-8″?>
<xml-body xmlns:foo=”http:mystite/foonamespace”>
<foo:test/>
</xml-body>If I run the validator manually, I get a dialog saying:
“The XML file is not valid. See the Tasks view for a list of the validation errors.”You actually need to go to the Problems view and the error is:
cvc-elt-1: Cannot find the declaration of element ‘xml-body’.
sidereanMemberAnd it even fails with a correct URL in the namespace declaration:
<xml-body xmlns:foo=”http://mystite/foonamespace”>Gee, I have to learn to copy/paste my example files 🙂
Riyad KallaMembersiderean,
Yes this is currently an issue that is filed that we are tracking. Sorry for the inconvenience, I just think the Editor doesn’t know how to read a namespace out of the root element.
Mahoney266MemberNot sure quite what to say – I’m afraid I still get the “cvc-elt-1: Cannot find the declaration of element ‘xsl:stylesheet'” error. But it looks as if this is now a known issue?
On the type ahead – looking at yours I notice all it offers in terms of elements are ones already in the xsl file. Perhaps this is a feature add request, but if I type in <xsl I really expect to be offered all valid tags for the xsl namespace in the type ahead, not just ones I’ve already used in the document.
Thanks,
Rob
SaliniPanchumarthiMemberI am not able to find a way to resolve the error when I validate the XSL file. I am getting the error at this line in the XSL file:
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”> –>
SaliniPanchumarthiMemberI tried replies given by you, none of them work to validate the XSL file
Scott AndersonParticipant<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -->
Is the line really commented out as it is in your example? Note the ending close comment
Riyad KallaMemberThis message has not been recovered.
-
AuthorPosts