Hi Adam

scomp has an option, -dl, which will download included and imported
schemas from the network. In the absence of this option no network
downloads take place and it searches for includes and imports locally.
I'm not sure of the details of exactly how this works but if you are
compiling successfully without the -dl option then it is correctly
finding the imported schema from somewhere local.

All the details of the infoset, including the information about the
namespace against which to validate instance docs, are included in the
.xsb files which are part of what gets generated in the jar. So when you
run validate() on an XmlBean you are comparing the instance to the
information in the .xsb's which in your case were compiled from the
local schema.

Cheers,

Lawrence

> -----Original Message-----
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 23, 2005 3:19 AM
> To: user@xmlbeans.apache.org
> Subject: RE: Namespace prefix throws spanner in works
> 
> A question about xmlbeans: if I change the schema locally and compile
my
> xmlbeans into a jar, is that elementFormDefault attribute (& all
schema
> info) compiled into my jar, or will xmlbeans validate() try to
reference
> the schema again?
> 
> In my current set-up in Eclipse, I am certain that the app is not
> accessing the schemas once running.
> 
> 
> Thanks
> Adam
> 
> 
> 
> > -----Original Message-----
> > From: Lawrence Jones [mailto:[EMAIL PROTECTED]
> > Sent: 20 May 2005 17:44
> > To: user@xmlbeans.apache.org
> > Subject: RE: Namespace prefix throws spanner in works
> >
> >
> > Hi Adam
> >
> > Without seeing the schema in full it's hard to tell, but
> > here's my guess. I guess that you've declared the
> > <mediumName> element as a local element in the schema (this
> > will happen if it is not an immediate child of the top-level
> > <schema> element).
> >
> > How you refer to local elements and specifically whether you
> > should include a namespace prefix or not is controlled by the
> > form attribute on the element's declaration in the schema. If
> > the form attribute is missing then it's controlled by the
> > elementFormDefault attribute on the surrounding <schema>
> > element. The default in both these cases (and therefore what
> > will happen if they are both missing) is "unqualified". This
> > means that local elements _must_ be referred to without a
> > namespace. I'm guessing that this is what has happened in your case.
> >
> > If the form value is "unqualified" then it is an error to
> > refer to the local element using a namespace prefix and the
> > validator correctly points this out.
> >
> > It sounds like you have control over the schema. If so then
> > you can change it so that either that specific element
> > declaration has form="qualified" or you can set the same rule
> > for the whole schema by setting
> > elementFormDefault="qualified" in the <schema> element instead.
> >
> > Note that it is equally an error for you to be expecting a
> > namespace and not to see one - so if you update your schema
> > in this way be sure that all clients know about it and will
> > ensure that all local elements are namespace qualified in all
> > the instance documents.
> >
> 
> http://www.bbc.co.uk/
> 
> This e-mail (and any attachments) is confidential and may contain
> personal views which are not the views of the BBC unless specifically
> stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in
> reliance on it and notify the sender immediately. Please note that the
> BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to