Namespace validation error

H

hooker

I'm building an XML file and associated schema using Roger Costello's
excellent reference and various online resources. The XML validates fine
as long as I don't turn on name space validation (i.e. the XML itself is
well formed as long as the schema is ignored).

I downloaded Sun's freestanding java validator so that I could work locally
instead of hitting the validation sites quite as much as I was doing. Hitting
my head against the wall however, hasn't stopped :)

The first few lines of the XML file look like this :

<?xml version="1.0"?>
<ConstellationNames
xmlns="http://www.hooksprogress.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.hooksprogress.org C.xs">

Running the Sun validator I get :

start parsing a grammar.
element "ConstellationNames" is not allowed here
5:68@http://www.hooksprogress.org/C.xml
perhaps namespace URI "http://www.hooksprogress.org" is incorrect?
5:68@http://www.hooksprogress.org/C.xml
failed to load a grammar.

and it hasn't tried to fetch the stylesheet. According to the online
examples that I can find (as well as Costello's powerpoint doc) what
I've done looks correct, although it clearly isn't.

Ideas? Please ?

--
The Hooker
Telepath wanted. You know where to apply.
[ www.sfwrg.org - SF Writers Resource Guide ]
[ www.pubfun.com - WA's best entertainment guide ]
hooker at pubfun dot com
 
H

hooker

Richard Tobin said:
You have xsi:noNamespaceSchemaLocation where you mean xsi:schemaLocation.

'Fraid not Richard - I've tried that (and done it again just now as a check).
Same errors.

--
The Hooker
Telepath wanted. You know where to apply.
[ www.sfwrg.org - SF Writers Resource Guide ]
[ www.pubfun.com - WA's best entertainment guide ]
hooker at pubfun dot com
 
R

Richard Tobin

You have xsi:noNamespaceSchemaLocation where you mean xsi:schemaLocation.
[/QUOTE]
'Fraid not Richard - I've tried that (and done it again just now as a check).
Same errors.

Well, that *does* need to be changed, but evidently you have some other
problem too.

The messages:

start parsing a grammar.
element "ConstellationNames" is not allowed here
5:68@http://www.hooksprogress.org/C.xml
perhaps namespace URI "http://www.hooksprogress.org" is incorrect?
5:68@http://www.hooksprogress.org/C.xml
failed to load a grammar.

suggest that maybe it is trying to read the document itself as a schema.
Have you checked the arguments to the validator?

-- Richard
 
H

hooker

Richard Tobin said:
Well, that *does* need to be changed, but evidently you have some other
problem too.
The messages:
start parsing a grammar.
element "ConstellationNames" is not allowed here
5:68@http://www.hooksprogress.org/C.xml
perhaps namespace URI "http://www.hooksprogress.org" is incorrect?
5:68@http://www.hooksprogress.org/C.xml
failed to load a grammar.
suggest that maybe it is trying to read the document itself as a schema.
Have you checked the arguments to the validator?

Aaarrrrgggghhh ! Thank you Richard, you're right.

You either give the validator a single parameter (which must be the schema)
or 2, the schema first followed by the XML file.

Sorry for wasting peoples time, and in future I'll RTFM a little better :)

--
The Hooker
Telepath wanted. You know where to apply.
[ www.sfwrg.org - SF Writers Resource Guide ]
[ www.pubfun.com - WA's best entertainment guide ]
hooker at pubfun dot com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top