PDA

View Full Version : Suggest an XML/DTD verifier for Linux?



marx2k
September 5th, 2007, 02:19 AM
I currently have a class where I am writing XML and DTD schemas and I am looking for a standalone program that will run through my schemas and verify them or give detailed error reports?

I have 2 plugins for Firefox but they are a bit convoluted.

I am using the XML Developer Toolbar as well as Total Validator 4.2

Does anyone have any other suggestions?

Mr_Smiley
September 5th, 2007, 10:51 AM
I have found XML Copy Editor (http://xml-copy-editor.sourceforge.net/) useful.

AZzKikR
September 5th, 2007, 12:21 PM
Why DTD and not XSD?

marx2k
September 6th, 2007, 05:35 PM
Perhaps I don't fully understand the difference between the two yet. I am currently doing simple XML and DTD writeups and just want to find something that will verify that the DTD I am writing that defines the XML within the document is valid. I will try using the suggested solution.

marx2k
September 6th, 2007, 05:40 PM
Followup: This is EXACTLY what I was looking for and MORE. Thank you very much for the suggestion!

Mr_Smiley
September 7th, 2007, 01:51 AM
Followup: This is EXACTLY what I was looking for and MORE. Thank you very much for the suggestion!
Not a problem. I was looking for the same sort of thing not that long ago.

AZzKikR
September 7th, 2007, 11:23 AM
Perhaps I don't fully understand the difference between the two yet. I am currently doing simple XML and DTD writeups and just want to find something that will verify that the DTD I am writing that defines the XML within the document is valid. I will try using the suggested solution.

DTD is older and in my opinion, obsolete. XML Schema (XSD) can do anything DTD can, and even more. A summary of DTD vs XSD:

DTD:

Is old, and derived from SGML;
No support of new XML features. Most important is namespaces. If you are going to work with XML, SOAP and that sort of things, namespaces are very important;
DTD uses a non-XML syntax;
Therefore, DTD is not very easy to understand IMHO.


XSD:

Is new;
Support fore namespaces;
Uses XML syntax, and therefore easier to extend, and understand;
Has better support for datatypes;
Can include regular expressions for validating XML attribute-values or node-values;
Has recommendation status from W3C.

LaRoza
September 7th, 2007, 03:21 PM
In XSD, you get phrases like this, quoted from my book:



The element element defines an element.


Which is true, but how does one explain THAT.

cwaldbieser
September 8th, 2007, 02:43 PM
DTD is older and in my opinion, obsolete. XML Schema (XSD) can do anything DTD can, and even more. A summary of DTD vs XSD:

DTD:

Is old, and derived from SGML;
No support of new XML features. Most important is namespaces. If you are going to work with XML, SOAP and that sort of things, namespaces are very important;
DTD uses a non-XML syntax;
Therefore, DTD is not very easy to understand IMHO.


XSD:

Is new;
Support fore namespaces;
Uses XML syntax, and therefore easier to extend, and understand;
Has better support for datatypes;
Can include regular expressions for validating XML attribute-values or node-values;
Has recommendation status from W3C.


I always liked schematron http://www.schematron.com/overview.html
I found it to be a easier to use when describing some things that were hard to express in XSD.