You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Hiranya Jayathilaka <hi...@gmail.com> on 2008/11/17 07:21:17 UTC

Implementing xsd:override Support

Hi Folks,

I'm about to start implementing xsd:override support for Xerces2/J. I
already had a look at how xsd:redefine support is implemented and it seems
it's completely implemented at the XSDHandler level using DOM. So I guess I
can take a similar approach in implementing the override support. Is this
acceptable? Is there anything in particular I should be aware of?

Thanks

Best Regards,
Hiranya

Re: Implementing xsd:override Support

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Hiranya,

You should be able to process <xs:override> in XSDHandler. That's where I
imagined the code would be. After you've checked the constraints on
<xs:override> [1] should be simpler to apply to the model than redefine. I
think when a component has been overridden it would be sufficient to hide
(see org.apache.xerces.util.DOMUtil.setHidden(Node,Hashtable)) the nodes in
the DOM which correspond to the components being overridden.

Thanks.

[1] http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#override-schema

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Hiranya Jayathilaka" <hi...@gmail.com> wrote on 11/17/2008 01:21:17
AM:

> Hi Folks,
>
> I'm about to start implementing xsd:override support for Xerces2/J.
> I already had a look at how xsd:redefine support is implemented and
> it seems it's completely implemented at the XSDHandler level using
> DOM. So I guess I can take a similar approach in implementing the
> override support. Is this acceptable? Is there anything in
> particular I should be aware of?
>
> Thanks
>
> Best Regards,
> Hiranya