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 Mukul Gandhi <mu...@apache.org> on 2010/08/14 16:07:07 UTC

XML Schema 1.1: implementation of built-in schema types

Hi all,
    I've been looking recently at built-in XML schema type
implementations and SchemaDVFactory in Xerces-J XML Schema 1.1
implementation.

I think some of the things here are still not compliant as per the new
XML Schema 1.1 spec.

I can find (or seem to find) following non-compliances at the moment:
1. built in schema atomic types are still derived from
xs:anySimpleType. as per 1.1 spec, these now need to be derived from
xs:anyAtomicType.
2. It seems relationship between xs:anyAtomicType, xs:anySimpleType
and xs:anyType also needs to be revisited in Xerces-J XML Schema 1.1
code-base.
3. The types ENTITIES, IDREFS and NMTOKENS are now (in schema 1.1)
child of xs:anySimpleType. In 1.0 they were child of ENTITY, IDREF and
NMTOKEN respectively. This change also needs to be revisited as well
in Xerces schema 1.1 code-base.

Would any of the committers like to volunteer to look at these issues
and FIX if required. Otherwise I'm willing to look at these, and
built-in types implementation in general in Xerces-J schema 1.1
code-base.


Any advise would be helpful please.



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


Re: XML Schema 1.1: implementation of built-in schema types

Posted by Mukul Gandhi <mu...@apache.org>.
Thanks, Khaled.

We'll wait for your thoughts about this topic, and probably a fix in near
future.

On Sun, Aug 15, 2010 at 9:15 PM, Khaled Noaman <kn...@ca.ibm.com> wrote:

>
> Hi Mukul,
>
> I need to spend some time thinking about that and will let you know once I
> have a fix for it.
>
> Regards,
> Khaled
>



-- 
Regards,
Mukul Gandhi

Re: XML Schema 1.1: implementation of built-in schema types

Posted by Khaled Noaman <kn...@ca.ibm.com>.
Hi Mukul,

I need to spend some time thinking about that and will let you know once I 
have a fix for it.

Regards,
Khaled





From:
Mukul Gandhi <mu...@apache.org>
To:
j-dev@xerces.apache.org
Date:
08/15/2010 09:50 AM
Subject:
Re: XML Schema 1.1: implementation of built-in schema types



On Sun, Aug 15, 2010 at 6:41 AM, Mukul Gandhi <mu...@apache.org> wrote:
> TO  [1]
> static final XSSimpleTypeDecl fAnySimpleType = new
> XSSimpleTypeDecl(SchemaGrammar.fAnyType11, "anyType", DV_ANYSIMPLETYPE,
> ORDERED_FALSE, false, true, false, true, XSConstants.ANYSIMPLETYPE_DT);
> (change DV_ANYSIMPLETYPE and XSConstants.ANYSIMPLETYPE_DT also).
> in XSSimpleTypeDecl.

I think the above needs to be instead as below:

static final XSSimpleTypeDecl fAnySimpleType = new
XSSimpleTypeDecl(SchemaGrammar.fAnyType11, "anySimpleType",
DV_ANYSIMPLETYPE, ORDERED_FALSE, false, true, false, true,
XSConstants.ANYSIMPLETYPE_DT);

I might be wrong when I said this:
"change DV_ANYSIMPLETYPE and XSConstants.ANYSIMPLETYPE_DT also"

&

"I think, something like AnyTypeDV doesn't exist in
org.apache.xerces.impl.dv.xs. I guess, we may need to create this as
well and link it with [1] above."

I hope all these points probably helps in analysis of the situation we
are discussing in this thread.

@ Khaled: i'll be happy to see this non-compliance corrected in Xerces
schema-dev SVN repos :)



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org




Re: XML Schema 1.1: implementation of built-in schema types

Posted by Mukul Gandhi <mu...@apache.org>.
On Sun, Aug 15, 2010 at 6:41 AM, Mukul Gandhi <mu...@apache.org> wrote:
> TO  [1]
> static final XSSimpleTypeDecl fAnySimpleType = new
> XSSimpleTypeDecl(SchemaGrammar.fAnyType11, "anyType", DV_ANYSIMPLETYPE,
> ORDERED_FALSE, false, true, false, true, XSConstants.ANYSIMPLETYPE_DT);
> (change DV_ANYSIMPLETYPE and XSConstants.ANYSIMPLETYPE_DT also).
> in XSSimpleTypeDecl.

I think the above needs to be instead as below:

static final XSSimpleTypeDecl fAnySimpleType = new
XSSimpleTypeDecl(SchemaGrammar.fAnyType11, "anySimpleType",
DV_ANYSIMPLETYPE, ORDERED_FALSE, false, true, false, true,
XSConstants.ANYSIMPLETYPE_DT);

I might be wrong when I said this:
"change DV_ANYSIMPLETYPE and XSConstants.ANYSIMPLETYPE_DT also"

&

"I think, something like AnyTypeDV doesn't exist in
org.apache.xerces.impl.dv.xs. I guess, we may need to create this as
well and link it with [1] above."

I hope all these points probably helps in analysis of the situation we
are discussing in this thread.

@ Khaled: i'll be happy to see this non-compliance corrected in Xerces
schema-dev SVN repos :)



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


Re: XML Schema 1.1: implementation of built-in schema types

Posted by Mukul Gandhi <mu...@apache.org>.
Hi Khaled,
    Thanks for the reply. That was helpful :)

I quickly looked at the code-base and below are few suggestions, about how
to make anyType a base type for anySimpleType.

On Sat, Aug 14, 2010 at 9:00 PM, Khaled Noaman <kn...@ca.ibm.com> wrote:

> anyAtomicType has anySimpleType as its base. However, since we are using
> the same static instance used by XML Schema 1.0, anySimpleType does not have
> anyType as it base as specified in XML Schema 1.1. Right now anySimpleType
> is an instance of XSSimpleTypeDecl which only expects a base type to be an
> XSSimpleTypeDecl object. So, I need to look into that one and see what's the
> best way to represent anySimpleType in XML Schema 1.1.
>
>
perhaps creating a new constructor for XSSimpleTypeDecl something like
following:

protected XSSimpleTypeDecl(XSComplexTypeDecl base ...     ) {

}

and making following declaration as public in SchemaGrammar:

private final static XSComplexTypeDecl fAnyType11 = new XS11AnyType();

and changing

static final XSSimpleTypeDecl fAnySimpleType = new XSSimpleTypeDecl(null,
"anySimpleType", DV_ANYSIMPLETYPE, ORDERED_FALSE, false, true, false, true,
XSConstants.ANYSIMPLETYPE_DT);

TO  [1]

static final XSSimpleTypeDecl fAnySimpleType = new
XSSimpleTypeDecl(SchemaGrammar.fAnyType11, "anyType", DV_ANYSIMPLETYPE,
ORDERED_FALSE, false, true, false, true, XSConstants.ANYSIMPLETYPE_DT);

(change DV_ANYSIMPLETYPE and XSConstants.ANYSIMPLETYPE_DT also).

in XSSimpleTypeDecl.

I think, something like AnyTypeDV doesn't exist
in org.apache.xerces.impl.dv.xs. I guess, we may need to create this as well
and link it with [1] above.

you may need to evaluate these points and make changes as appropriate.



-- 
Regards,
Mukul Gandhi

Re: XML Schema 1.1: implementation of built-in schema types

Posted by Khaled Noaman <kn...@ca.ibm.com>.
Hi Mukul


> 1. built in schema atomic types are still derived from
> xs:anySimpleType. as per 1.1 spec, these now need to be derived from
> xs:anyAtomicType.

The types in XML Schema 1.1 are derived from anyAtomicType and not 
anySimpleType. If you check the code in Schema11DVFactoryImpl, you'll 
notice that we are using anyAtomicType as the base for the built-in types.

        createBuiltInTypes(fBuiltInTypes, XSSimpleTypeDecl.fAnyAtomicType
);

> 2. It seems relationship between xs:anyAtomicType, xs:anySimpleType
> and xs:anyType also needs to be revisited in Xerces-J XML Schema 1.1
> code-base.

anyAtomicType has anySimpleType as its base. However, since we are using 
the same static instance used by XML Schema 1.0, anySimpleType does not 
have anyType as it base as specified in XML Schema 1.1. Right now 
anySimpleType is an instance of XSSimpleTypeDecl which only expects a base 
type to be an XSSimpleTypeDecl object. So, I need to look into that one 
and see what's the best way to represent anySimpleType in XML Schema 1.1.

>  3. The types ENTITIES, IDREFS and NMTOKENS are now (in schema 1.1)
> child of xs:anySimpleType. In 1.0 they were child of ENTITY, IDREF and
> NMTOKEN respectively. This change also needs to be revisited as well
> in Xerces schema 1.1 code-base.

This is a bug. Thanks for bringing that up. I will check in a fix for it.

Regards,
Khaled





From:
Mukul Gandhi <mu...@apache.org>
To:
j-dev@xerces.apache.org
Date:
08/14/2010 11:01 AM
Subject:
Re: XML Schema 1.1: implementation of built-in schema types



Thanks, Michael.

It would be great if Khaled looks at this :)

I'll wait (or in general we should wait) for a change or a
communication coming from Khaled related to this part of the code-base
:)

On Sat, Aug 14, 2010 at 8:19 PM, Michael Glavassevich
<mr...@ca.ibm.com> wrote:
> Hi Mukul,
>
> I think Khaled set up the XML Schema 1.1 DV factory. Probably should 
give
> him an opportunity to weigh in on this. He may already be aware of the
> problem and have local changes he hasn't committed yet.
>
> Thanks.
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org




Re: XML Schema 1.1: implementation of built-in schema types

Posted by Mukul Gandhi <mu...@apache.org>.
Thanks, Michael.

It would be great if Khaled looks at this :)

I'll wait (or in general we should wait) for a change or a
communication coming from Khaled related to this part of the code-base
:)

On Sat, Aug 14, 2010 at 8:19 PM, Michael Glavassevich
<mr...@ca.ibm.com> wrote:
> Hi Mukul,
>
> I think Khaled set up the XML Schema 1.1 DV factory. Probably should give
> him an opportunity to weigh in on this. He may already be aware of the
> problem and have local changes he hasn't committed yet.
>
> Thanks.
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org



-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


Re: XML Schema 1.1: implementation of built-in schema types

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

I think Khaled set up the XML Schema 1.1 DV factory. Probably should give
him an opportunity to weigh in on this. He may already be aware of the
problem and have local changes he hasn't committed yet.

Thanks.

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

Mukul Gandhi <mu...@apache.org> wrote on 08/14/2010 10:07:07 AM:

> Hi all,
>     I've been looking recently at built-in XML schema type
> implementations and SchemaDVFactory in Xerces-J XML Schema 1.1
> implementation.
>
> I think some of the things here are still not compliant as per the new
> XML Schema 1.1 spec.
>
> I can find (or seem to find) following non-compliances at the moment:
> 1. built in schema atomic types are still derived from
> xs:anySimpleType. as per 1.1 spec, these now need to be derived from
> xs:anyAtomicType.
> 2. It seems relationship between xs:anyAtomicType, xs:anySimpleType
> and xs:anyType also needs to be revisited in Xerces-J XML Schema 1.1
> code-base.
> 3. The types ENTITIES, IDREFS and NMTOKENS are now (in schema 1.1)
> child of xs:anySimpleType. In 1.0 they were child of ENTITY, IDREF and
> NMTOKEN respectively. This change also needs to be revisited as well
> in Xerces schema 1.1 code-base.
>
> Would any of the committers like to volunteer to look at these issues
> and FIX if required. Otherwise I'm willing to look at these, and
> built-in types implementation in general in Xerces-J schema 1.1
> code-base.
>
>
> Any advise would be helpful please.
>
> --
> Regards,
> Mukul Gandhi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-dev-help@xerces.apache.org