logo       
Google Custom Search

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

Re: Validation error on prefixed attribute: msg#00077

Subject: Re: Validation error on prefixed attribute
Interestingly you can change this default behaviour very easily via the schema element in your XSD.

Use the elementFormDefault attribute to change how namespacing of elements works and attributeFormDefault to change how namespacing of attributes works. Both reside on the schema element and both take either "qualified" or "unqualified".

Phil :n)

On Wed, 2004-01-14 at 15:18, Vincent Figari wrote:
George,

I think you are right, I guess I was wrongly assuming that the
attributes defined on elements specified in the .xsd were 
implicitly belonging to the targetNamespace of the .xsd as well.

Sounds like a wrong assumption, attributes belong implicitly to 
no name space.

Thanks,

Vincent


--- George Cristian Bina <george@xxxxxxx> wrote:
> > With my example, Xerces has schema validation enabled,
> > and Xerces parser is initialized with a .xsd defining
> > an element named "elem" having an attribute named "attr"
> > in a namespace whose URI is "some-uri".
> >
> > <pr:elem attr="value" xmlns:pr="some-uri" />
> > will be parsed succesfully by Xerces, but:
> >
> > <pr:elem pr:attr="value" xmlns:pr="some-uri" />
> > will cause Xerces to throw:
> > Fatal: cvc-complex-type.3.2.2: Attribute "pr:attr" is not allowed to
> appear in element "pr:elem"
> 
> In the first case attr belongs to no namespace while in the second case attr
> belongs to "some-uri" namespace. It seems that your schema defines the the
> attribute in no namespace and not in the "some-uri" namespace.
> 
> Best Regards,
>  George
> -------------------------------------------------------------
> George Cristian Bina mailto:george@xxxxxxxxxxxxx
> <oXygen/> XML Editor - http://www.oxygenxml.com/
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
> For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
--
Phil Weighill-Smith <phil.weighill-smith@xxxxxxxxxxxx>
Volantis Systems

Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>