no schema or DTD associated with document???

Having trouble installing Oxygen? Got a bug to report? Post it all here.
kencorbin
Posts: 2
Joined: Mon Apr 05, 2010 2:36 pm

no schema or DTD associated with document???

Post 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
Radu
Posts: 9439
Joined: Fri Jul 09, 2004 5:18 pm

Re: no schema or DTD associated with document???

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
kencorbin
Posts: 2
Joined: Mon Apr 05, 2010 2:36 pm

Re: no schema or DTD associated with document???

Post 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.
Radu
Posts: 9439
Joined: Fri Jul 09, 2004 5:18 pm

Re: no schema or DTD associated with document???

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jn01
Posts: 1
Joined: Fri Sep 20, 2013 7:16 pm

Re: no schema or DTD associated with document???

Post 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>
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: no schema or DTD associated with document???

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply