Forum Moderators: open

Message Too Old, No Replies

Where to validate XML 1.1 with schema reference

         

eSite

8:52 am on May 5, 2007 (gmt 0)



Hi,

I want to make my document in XML 1.1 but can't find a validator for it.
I also want my document to use XSD instead of DTD, but no matter if the document is XML 1.1 or 1.0, the validator says that it found a namespace in a non XML document and/or that the DTD is missing.

cmarshall

1:37 pm on May 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have used several validators. I'll mention two of them here. I hope these pass "mod muster." They should be OK. One, I will link, the other, I won't, but it should be easy to find:

I use Validome [validome.org]. It is a very, very good XML validator. You need to make sure the schema/DTD is available to the validator and is referenced with a schemalocation that is Internet-accessible (You can upload the file, but not the schema). However, this is XML 1.0. You might send them an email to see if they are testing a 1.1 version. I'll bet they are.

Why don't I know? Because I don't use Validome for testing XML anymore. I now use <oXygen/>. This is far more flexible and powerful. I don't have to have schemalocation attributes, and it will deal with both DTD and schema.

I chiefly use Validome as a quick check of my HTML/XHTML/WML docs online. <oXygen/> will also check them, but Validome is quicker for me.

Oxygenxml is quite cheap for the home/academic version ($48). It is nowhere near as powerful as Altova XMSpy, but it is also about $600 cheaper, and multi-platform (I use a Mac).

I know that there is a free Java XML 1.1 validator library out there (IBM supplies it), so I'm sure that, if there is not one already, there will be an online validator soon.

pageoneresults

1:49 pm on May 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Never mind, out of my realm. ;)

[w3.org...]

Why doesn't the W3C have one?

eSite

11:12 am on May 6, 2007 (gmt 0)



Thanks, I'm making my XSD to validate my format with validome.
In the mean time I asked them for an XML 1.1 validator.

I don't like Java based apps because they are slow and look ugly, but I tried Oxygen and it looks very handy, maybe too feature rich for my need.

On another forum I was suggested RXP [cogsci.ed.ac.uk...]

cmarshall

4:12 pm on May 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why doesn't the W3C have one?

Good question. I don't even know if they have a 1.0 validator.

There are generally two types of XML validation:

1) "Well-formed-ness," in which they do a basic generic syntax check to make sure that the elements are all closed and balanced, the names are in lowercase, the character set is honored, etc.

2) DTD/Schema, in which the file is checked against a DTD or schema. This verifies that required elements/attributes are there, that data types are correct, etc. This is the type of validation you generally see with XHTML validators.

I think that #1 is almost worthless. I write well-formed XML in my sleep. <oXygen/> is nice, because it is continually running a validation on your file (#2, if possible). I just look over at the red/green square on the right of the window to see how I'm doing.

eSite

6:06 pm on May 6, 2007 (gmt 0)



Can Oxygen generate an XSD from an XML?
I tried the Generate Documentation > Schema Documentation feature but it didn't create any file!

PS: I'm also on Mac OS X

cmarshall

6:41 pm on May 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think it can.

That Generate thingy doesn't create a schema. Not exactly sure what it does. Maybe an autodoc type of thing. It needs a schema to run.

I hear ya. Creating a schema is a pain in the butt. I did see an option for creating a sample XML file from a schema, which is nice.