cannot find the declaration of element xsl:stylesheet

Here should go questions about transforming XML with XSLT and FOP.
bnz
Posts: 6
Joined: Tue Sep 25, 2007 11:51 am

cannot find the declaration of element xsl:stylesheet

Post by bnz »

Hello,

i haven't worked with Oxygen and the xsd/xsl's i am working with in a while, but i somehow get the following error message while validating the xsl:

Description Resource Path Location Type
[Xerces] cvc-elt.1: Cannot find the declaration of element 'xsl:stylesheet'.
@see: http://www.w3.org/TR/xmlschema-1/#cvc-elt ltsml_to_dot.xsl ltsml-xslt/src line 2 XML Problem


This already happens with the following minimal version of a stylesheet:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lml="http://www.trex.informatik.uni-goettingen.de/ltsml"
xsi:schemaLocation="http://www.trex.informatik.uni-goettingen.de/ltsml http://www.trex.informatik.uni-goettingen.de/ltsml/ltsml.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>


</xsl:stylesheet>
I hope someone has an idea what is wrong here. After a quick google search i came up with a schema for xsl, but including it in the xml catalog somehow didn't have the expected effect (or maybe i did something wrong).
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: cannot find the declaration of element xsl:stylesheet

Post by sorin_ristache »

Hello,

You edited an XSL file in the Oxygen XML Editor of the Oxygen plugin for Eclipse instead of the Oxygen XSL Editor. If you create a new file you should select File -> New -> Other -- oXygen -- XSL File. If the file is already created you should open it with Oxygen XSL Editor. The Oxygen XSL Editor should be the default editor for .xsl files, that is the editor type created when you double click on an .xsl file. If you made other editor the default for .xsl files you have to right click on the .xsl file and select Open With -> Oxygen XSL Editor.


Regards,
Sorin
bnz
Posts: 6
Joined: Tue Sep 25, 2007 11:51 am

Re: cannot find the declaration of element xsl:stylesheet

Post by bnz »

Wow, i didn't see _that_ solution coming ;-) I was messing around with the namespace declarations all the time. Thanks a lot for the quick response, everything is fine now!
Post Reply