Page 1 of 1
no schema or DTD associated with document???
Posted: Mon Apr 05, 2010 8:30 pm
by kencorbin
I just downloaded the XML editor and am trying to use it to validate XHTML pages. So far it looks pretty slick, but there is the one annoying thing I can't figure out.
When I try to validate documents from the Project window, they almost always throw a 'There is no schema or DTD associated with the document' error. When I validate the same documents in editor window they work just fine. I say almost always because there was a brief period earlier this morning when they were also validating correctly from the project window, but any other time they have always failed.
Regardless, shouldn't the editor and project window validations be using the same engine? Why would they get different results? And what can I do to fix it???
Thanks for any assistance,
-Ken
Re: no schema or DTD associated with document???
Posted: Tue Apr 06, 2010 11:26 am
by Radu
Hi Ken,
The error
'There is no schema or DTD associated with the document' is usually received when an XML document does not reference the associated grammar explicitly (and XHTML files usually do not reference explicitly the associated grammar) and Oxygen cannot auto-detect a grammar to use for that file. Indeed validation from the Project and from the main editor should give the same results.
I tried to create some small XHTML files and validate them (from Project and from the main editor) but could not reproduce this behavior you are describing.
Does it happen consistently on your side?
If it does, maybe you can give us some sample files to test and tell us more steps and details (like if you are using Oxygen standalone or Eclipse plugin).
You can find our email address here:
http://www.oxygenxml.com/contact.html
Regards,
Radu
Re: no schema or DTD associated with document???
Posted: Thu Apr 08, 2010 4:38 am
by kencorbin
I discovered something profound. The project validation does work exactly as expected. When the file extension is .xml or .xhtml or probably anything except .html.
But the textbook we are following told to use .html extensions. And with a .html extension, project window validation just doesn't work.
That will at least give you something to try. And hopefully there is some silly configuration setting I can throw to fix it.
If not, I'm going tell the class to ignore the book and give everything a .xhtml extension.
Re: no schema or DTD associated with document???
Posted: Fri Apr 09, 2010 9:37 am
by Radu
Hi Ken,
Your suspicions are correct. The Oxygen from-project validation does not attempt to detect an associated grammar with the .html file extensions.
We will correct this problem in the next Oxygen version.
Regards,
Radu
Re: no schema or DTD associated with document???
Posted: Fri Sep 20, 2013 7:19 pm
by jn01
This is my XML and i still get the error while validating my XML -
what is the issue with my xml?
<?xml version="1.0" encoding="UTF-8"?>
<print-cover-sheet-data><cover-sheet-values-info xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:java="
http://java.sun.com" xsi:type="java:com.kyfbins.model.CoverSheetInfo"><dcs_-blank_-account>N</dcs_-blank_-account><dcs_-agency>null</dcs_-agency><dcs_-policy_-number>H0527963</dcs_-policy_-number><dcs_-account_-number></dcs_-account_-number><dcs_-blank_-policy>N</dcs_-blank_-policy><dcs_-claim_-number>03710583</dcs_-claim_-number></cover-sheet-values-info><printers-info xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:java="
http://java.sun.com" xsi:type="java:com.kyfbins.model.PrintCoverSheetPrinterInfo"><printer-name>\\sprt200\INSYPRT3</printer-name><no-of-copies>3</no-of-copies></printers-info><user-id>UND9999</user-id></print-cover-sheet-data>
Re: no schema or DTD associated with document???
Posted: Mon Sep 23, 2013 5:56 pm
by adrian
Hi,
@jn01: You don't seem to have a DTD or a schema associated with the document, so there's nothing to validate it against.
If you have a DTD or a schema, you can associate it with your document in Oxygen from Document > Schema > Associate Schema.
If you don't have a DTD or a schema, the best you can do is check the document for XML well formedness: Document > Validate > Check Well-Formedness (Ctrl+Shift+W)
Regards,
Adrian