Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » BaseType of a underived ComplexType
BaseType of a underived ComplexType [message #46119] Wed, 26 May 2004 20:24 Go to next message
Eclipse User
Originally posted by: comfortably007numb-python.yahoo.com

Hi,

I am trying to visit a schema as a tree. During the visit, the
following procedure is called to visit complex type definition.

visit(XSDComplexTypeDefinition type) {
visit(type.getBaseTypeDefinition());
......
}

However, the same method is called recursively again with the same
argument. In short, type.getBaseTypeDefinition() returned the object
referred to by variable type. Is this the intended behavior? Or a bug
in XSD? Or am I missing something?

According to XSD specs, it should return the extension/restriction
parent of the object bound to type and, if none exists, it should be
anyType (as it is the root of the Type Hierarchy). Is this so? Or am I
misreading the specs?

waiting for reply,

--

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad
Re: BaseType of a underived ComplexType [message #46149 is a reply to message #46119] Wed, 26 May 2004 23:42 Go to previous messageGo to next message
Eclipse User
Originally posted by: comfortably007numb-python.yahoo.com

Venkatesh Prasad Ranganath wrote:

> Hi,
>
> I am trying to visit a schema as a tree. During the visit, the
> following procedure is called to visit complex type definition.
> visit(XSDComplexTypeDefinition type) {
> visit(type.getBaseTypeDefinition());
> ......
> }
>
> However, the same method is called recursively again with the same
> argument. In short, type.getBaseTypeDefinition() returned the object
> referred to by variable type. Is this the intended behavior? Or a
> bug in XSD? Or am I missing something?
>
> According to XSD specs, it should return the extension/restriction
> parent of the object bound to type and, if none exists, it should be
> anyType (as it is the root of the Type Hierarchy). Is this so? Or am
> I misreading the specs?
>
> waiting for reply,
>
Well, the object referred to by variable type represents anyType.
However, getBaseTypeDefinition() on it results in a reference to
itself. Now, is this the intended behavior as it violates the "root"
property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
object that represents anyType return null?

waiting for reply,

--

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad
Re: BaseType of a underived ComplexType [message #46208 is a reply to message #46149] Thu, 27 May 2004 06:09 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

--------------98A704D06138BE43607A49C9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Venkatesh,

No, the base type of the anyType is itself as defined in the spec:

http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition

Venkatesh Prasad Ranganath wrote:

> Venkatesh Prasad Ranganath wrote:
>
> > Hi,
> >
> > I am trying to visit a schema as a tree. During the visit, the
> > following procedure is called to visit complex type definition.
> > visit(XSDComplexTypeDefinition type) {
> > visit(type.getBaseTypeDefinition());
> > ......
> > }
> >
> > However, the same method is called recursively again with the same
> > argument. In short, type.getBaseTypeDefinition() returned the object
> > referred to by variable type. Is this the intended behavior? Or a
> > bug in XSD? Or am I missing something?
> >
> > According to XSD specs, it should return the extension/restriction
> > parent of the object bound to type and, if none exists, it should be
> > anyType (as it is the root of the Type Hierarchy). Is this so? Or am
> > I misreading the specs?
> >
> > waiting for reply,
> >
> Well, the object referred to by variable type represents anyType.
> However, getBaseTypeDefinition() on it results in a reference to
> itself. Now, is this the intended behavior as it violates the "root"
> property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
> object that represents anyType return null?
>
> waiting for reply,
>
> --
>
> Venkatesh Prasad Ranganath,
> Dept. Computing and Information Science,
> Kansas State University, US.
> web: http://www.cis.ksu.edu/~rvprasad

--------------98A704D06138BE43607A49C9
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Venkatesh,
<p>No, the base type of the anyType is itself as defined in the spec:
<blockquote><a href=" http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition"> http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition</a></blockquote>

<p><br>Venkatesh Prasad Ranganath wrote:
<blockquote TYPE=CITE>Venkatesh Prasad Ranganath wrote:
<p>> Hi,
<br>>
<br>> I am trying to visit a schema as a tree.&nbsp; During the visit,&nbsp;
the
<br>> following procedure is called to visit complex type definition.
<br>> visit(XSDComplexTypeDefinition type) {
<br>>&nbsp;&nbsp;&nbsp; visit(type.getBaseTypeDefinition());
<br>>&nbsp;&nbsp;&nbsp; ......
<br>> }
<br>>
<br>> However, the same method is called recursively again with the same
<br>> argument.&nbsp; In short, type.getBaseTypeDefinition() returned the
object
<br>> referred to by variable type.&nbsp; Is this the intended behavior?&nbsp;
Or a
<br>> bug in XSD?&nbsp; Or am I missing something?
<br>>
<br>> According to XSD specs, it should return the extension/restriction
<br>> parent of the object bound to type and, if none exists, it should
be
<br>> anyType (as it is the root of the Type Hierarchy).&nbsp; Is this
so?&nbsp; Or am
<br>> I misreading the specs?
<br>>
<br>> waiting for reply,
<br>>
<br>Well, the object referred to by variable type represents anyType.
<br>However, getBaseTypeDefinition() on it results in a reference to
<br>itself.&nbsp; Now, is this the intended behavior as it violates the
"root"
<br>property of the Type Hierarchy?&nbsp; Shouldn't getBaseTypeDefinition()
on an
<br>object that represents anyType return null?
<p>waiting for reply,
<p>--
<p>Venkatesh Prasad Ranganath,
<br>Dept. Computing and Information Science,
<br>Kansas State University, US.
<br>web: <a href="http://www.cis.ksu.edu/~rvprasad">http://www.cis.ksu.edu/~rvprasad</a></blockquote>
</html>

--------------98A704D06138BE43607A49C9--
Re: BaseType of a underived ComplexType [message #46291 is a reply to message #46208] Thu, 27 May 2004 16:18 Go to previous messageGo to next message
Eclipse User
Originally posted by: comfortably007numb-python.yahoo.com

Ed Merks wrote:

> Venkatesh,
>
> No, the base type of the anyType is itself as defined in the spec:
>
> http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition
>
>
Thanks for the clarification. I see that a default anyType is plugged
into the type definition hierarchy. Is this instance defined as a
constant in any of the XSD classes? If so, which one?

> Venkatesh Prasad Ranganath wrote:
>
>> Venkatesh Prasad Ranganath wrote:
>>
>> > Hi,
>> >
>> > I am trying to visit a schema as a tree. During the visit, the
>> > following procedure is called to visit complex type definition.
>> > visit(XSDComplexTypeDefinition type) {
>> > visit(type.getBaseTypeDefinition());
>> > ......
>> > }
>> >
>> > However, the same method is called recursively again with the same
>> > argument. In short, type.getBaseTypeDefinition() returned the object
>> > referred to by variable type. Is this the intended behavior? Or a
>> > bug in XSD? Or am I missing something?
>> >
>> > According to XSD specs, it should return the extension/restriction
>> > parent of the object bound to type and, if none exists, it should be
>> > anyType (as it is the root of the Type Hierarchy). Is this so? Or am
>> > I misreading the specs?
>> >
>> > waiting for reply,
>> >
>> Well, the object referred to by variable type represents anyType.
>> However, getBaseTypeDefinition() on it results in a reference to
>> itself. Now, is this the intended behavior as it violates the "root"
>> property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
>> object that represents anyType return null?
>>
>> waiting for reply,
>>
>> --
>>
>> Venkatesh Prasad Ranganath,
>> Dept. Computing and Information Science,
>> Kansas State University, US.
>> web: http://www.cis.ksu.edu/~rvprasad
>> <http://www.cis.ksu.edu/%7Ervprasad>
>>


--

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad
Re: BaseType of a underived ComplexType [message #46322 is a reply to message #46291] Thu, 27 May 2004 16:43 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

--------------62E444AA84B7043313137BA2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Venkatesh,

No. Normally you'd get it like this:

xsdSchema.getSchemaForSchema().resolveComplexTypeDefinition( "anyType");

The schema for schema is a shared instance based on the schema for schema namespace
used by the schema. Note that there are recognizers like XSDUtil.isURType for
testing if you have one of these special any types...


Venkatesh Prasad Ranganath wrote:

> Ed Merks wrote:
>
> > Venkatesh,
> >
> > No, the base type of the anyType is itself as defined in the spec:
> >
> > http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition
> >
> >
> Thanks for the clarification. I see that a default anyType is plugged
> into the type definition hierarchy. Is this instance defined as a
> constant in any of the XSD classes? If so, which one?
>
> > Venkatesh Prasad Ranganath wrote:
> >
> >> Venkatesh Prasad Ranganath wrote:
> >>
> >> > Hi,
> >> >
> >> > I am trying to visit a schema as a tree. During the visit, the
> >> > following procedure is called to visit complex type definition.
> >> > visit(XSDComplexTypeDefinition type) {
> >> > visit(type.getBaseTypeDefinition());
> >> > ......
> >> > }
> >> >
> >> > However, the same method is called recursively again with the same
> >> > argument. In short, type.getBaseTypeDefinition() returned the object
> >> > referred to by variable type. Is this the intended behavior? Or a
> >> > bug in XSD? Or am I missing something?
> >> >
> >> > According to XSD specs, it should return the extension/restriction
> >> > parent of the object bound to type and, if none exists, it should be
> >> > anyType (as it is the root of the Type Hierarchy). Is this so? Or am
> >> > I misreading the specs?
> >> >
> >> > waiting for reply,
> >> >
> >> Well, the object referred to by variable type represents anyType.
> >> However, getBaseTypeDefinition() on it results in a reference to
> >> itself. Now, is this the intended behavior as it violates the "root"
> >> property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
> >> object that represents anyType return null?
> >>
> >> waiting for reply,
> >>
> >> --
> >>
> >> Venkatesh Prasad Ranganath,
> >> Dept. Computing and Information Science,
> >> Kansas State University, US.
> >> web: http://www.cis.ksu.edu/~rvprasad
> >> <http://www.cis.ksu.edu/%7Ervprasad>
> >>
>
> --
>
> Venkatesh Prasad Ranganath,
> Dept. Computing and Information Science,
> Kansas State University, US.
> web: http://www.cis.ksu.edu/~rvprasad

--------------62E444AA84B7043313137BA2
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Venkatesh,
<p>No.&nbsp; Normally you'd get it like this:
<blockquote> &nbsp;xsdSchema.getSchemaForSchema().resolveComplexTypeD efinition( "anyType");</blockquote>
The schema for schema is a shared instance based on the schema for schema
namespace used by the schema.&nbsp; Note that there are recognizers like
XSDUtil.isURType for testing if you have one of these special any types...
<br>&nbsp;
<p>Venkatesh Prasad Ranganath wrote:
<blockquote TYPE=CITE>Ed Merks wrote:
<p>> Venkatesh,
<br>>
<br>> No, the base type of the anyType is itself as defined in the spec:
<br>>
<br>>&nbsp;&nbsp;&nbsp;&nbsp; <a href=" http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition"> http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition</a>
<br>>
<br>>
<br>Thanks for the clarification.&nbsp; I see that a default anyType is
plugged
<br>into the type definition hierarchy.&nbsp; Is this instance defined
as a
<br>constant in any of the XSD classes?&nbsp; If so, which one?
<p>> Venkatesh Prasad Ranganath wrote:
<br>>
<br>>> Venkatesh Prasad Ranganath wrote:
<br>>>
<br>>> > Hi,
<br>>> >
<br>>> > I am trying to visit a schema as a tree.&nbsp; During the visit,&nbsp;
the
<br>>> > following procedure is called to visit complex type definition.
<br>>> > visit(XSDComplexTypeDefinition type) {
<br>>> >&nbsp;&nbsp;&nbsp; visit(type.getBaseTypeDefinition());
<br>>> >&nbsp;&nbsp;&nbsp; ......
<br>>> > }
<br>>> >
<br>>> > However, the same method is called recursively again with the
same
<br>>> > argument.&nbsp; In short, type.getBaseTypeDefinition() returned
the object
<br>>> > referred to by variable type.&nbsp; Is this the intended behavior?&nbsp;
Or a
<br>>> > bug in XSD?&nbsp; Or am I missing something?
<br>>> >
<br>>> > According to XSD specs, it should return the extension/restriction
<br>>> > parent of the object bound to type and, if none exists, it should
be
<br>>> > anyType (as it is the root of the Type Hierarchy).&nbsp; Is this
so?&nbsp; Or am
<br>>> > I misreading the specs?
<br>>> >
<br>>> > waiting for reply,
<br>>> >
<br>>> Well, the object referred to by variable type represents anyType.
<br>>> However, getBaseTypeDefinition() on it results in a reference to
<br>>> itself.&nbsp; Now, is this the intended behavior as it violates
the "root"
<br>>> property of the Type Hierarchy?&nbsp; Shouldn't getBaseTypeDefinition()
on an
<br>>> object that represents anyType return null?
<br>>>
<br>>> waiting for reply,
<br>>>
<br>>> --
<br>>>
<br>>> Venkatesh Prasad Ranganath,
<br>>> Dept. Computing and Information Science,
<br>>> Kansas State University, US.
<br>>> web: <a href="http://www.cis.ksu.edu/~rvprasad">http://www.cis.ksu.edu/~rvprasad</a>
<br>>> &lt;<a href="http://www.cis.ksu.edu/%7Ervprasad">http://www.cis.ksu.edu/%7Ervprasad</a>>
<br>>>
<p>--
<p>Venkatesh Prasad Ranganath,
<br>Dept. Computing and Information Science,
<br>Kansas State University, US.
<br>web: <a href="http://www.cis.ksu.edu/~rvprasad">http://www.cis.ksu.edu/~rvprasad</a></blockquote>
</html>

--------------62E444AA84B7043313137BA2--
Re: BaseType of a underived ComplexType [message #587732 is a reply to message #46119] Wed, 26 May 2004 23:42 Go to previous message
Eclipse User
Originally posted by: comfortably007numb-python.yahoo.com

Venkatesh Prasad Ranganath wrote:

> Hi,
>
> I am trying to visit a schema as a tree. During the visit, the
> following procedure is called to visit complex type definition.
> visit(XSDComplexTypeDefinition type) {
> visit(type.getBaseTypeDefinition());
> ......
> }
>
> However, the same method is called recursively again with the same
> argument. In short, type.getBaseTypeDefinition() returned the object
> referred to by variable type. Is this the intended behavior? Or a
> bug in XSD? Or am I missing something?
>
> According to XSD specs, it should return the extension/restriction
> parent of the object bound to type and, if none exists, it should be
> anyType (as it is the root of the Type Hierarchy). Is this so? Or am
> I misreading the specs?
>
> waiting for reply,
>
Well, the object referred to by variable type represents anyType.
However, getBaseTypeDefinition() on it results in a reference to
itself. Now, is this the intended behavior as it violates the "root"
property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
object that represents anyType return null?

waiting for reply,

--

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad
Re: BaseType of a underived ComplexType [message #587752 is a reply to message #46149] Thu, 27 May 2004 06:09 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25939
Registered: July 2009
Senior Member
--------------98A704D06138BE43607A49C9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Venkatesh,

No, the base type of the anyType is itself as defined in the spec:

http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition

Venkatesh Prasad Ranganath wrote:

> Venkatesh Prasad Ranganath wrote:
>
> > Hi,
> >
> > I am trying to visit a schema as a tree. During the visit, the
> > following procedure is called to visit complex type definition.
> > visit(XSDComplexTypeDefinition type) {
> > visit(type.getBaseTypeDefinition());
> > ......
> > }
> >
> > However, the same method is called recursively again with the same
> > argument. In short, type.getBaseTypeDefinition() returned the object
> > referred to by variable type. Is this the intended behavior? Or a
> > bug in XSD? Or am I missing something?
> >
> > According to XSD specs, it should return the extension/restriction
> > parent of the object bound to type and, if none exists, it should be
> > anyType (as it is the root of the Type Hierarchy). Is this so? Or am
> > I misreading the specs?
> >
> > waiting for reply,
> >
> Well, the object referred to by variable type represents anyType.
> However, getBaseTypeDefinition() on it results in a reference to
> itself. Now, is this the intended behavior as it violates the "root"
> property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
> object that represents anyType return null?
>
> waiting for reply,
>
> --
>
> Venkatesh Prasad Ranganath,
> Dept. Computing and Information Science,
> Kansas State University, US.
> web: http://www.cis.ksu.edu/~rvprasad

--------------98A704D06138BE43607A49C9
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Venkatesh,
<p>No, the base type of the anyType is itself as defined in the spec:
<blockquote><a href=" http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition"> http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition</a></blockquote>

<p><br>Venkatesh Prasad Ranganath wrote:
<blockquote TYPE=CITE>Venkatesh Prasad Ranganath wrote:
<p>> Hi,
<br>>
<br>> I am trying to visit a schema as a tree.&nbsp; During the visit,&nbsp;
the
<br>> following procedure is called to visit complex type definition.
<br>> visit(XSDComplexTypeDefinition type) {
<br>>&nbsp;&nbsp;&nbsp; visit(type.getBaseTypeDefinition());
<br>>&nbsp;&nbsp;&nbsp; ......
<br>> }
<br>>
<br>> However, the same method is called recursively again with the same
<br>> argument.&nbsp; In short, type.getBaseTypeDefinition() returned the
object
<br>> referred to by variable type.&nbsp; Is this the intended behavior?&nbsp;
Or a
<br>> bug in XSD?&nbsp; Or am I missing something?
<br>>
<br>> According to XSD specs, it should return the extension/restriction
<br>> parent of the object bound to type and, if none exists, it should
be
<br>> anyType (as it is the root of the Type Hierarchy).&nbsp; Is this
so?&nbsp; Or am
<br>> I misreading the specs?
<br>>
<br>> waiting for reply,
<br>>
<br>Well, the object referred to by variable type represents anyType.
<br>However, getBaseTypeDefinition() on it results in a reference to
<br>itself.&nbsp; Now, is this the intended behavior as it violates the
"root"
<br>property of the Type Hierarchy?&nbsp; Shouldn't getBaseTypeDefinition()
on an
<br>object that represents anyType return null?
<p>waiting for reply,
<p>--
<p>Venkatesh Prasad Ranganath,
<br>Dept. Computing and Information Science,
<br>Kansas State University, US.
<br>web: <a href="http://www.cis.ksu.edu/~rvprasad">http://www.cis.ksu.edu/~rvprasad</a></blockquote>
</html>

--------------98A704D06138BE43607A49C9--
Re: BaseType of a underived ComplexType [message #587788 is a reply to message #46208] Thu, 27 May 2004 16:18 Go to previous message
Eclipse User
Originally posted by: comfortably007numb-python.yahoo.com

Ed Merks wrote:

> Venkatesh,
>
> No, the base type of the anyType is itself as defined in the spec:
>
> http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition
>
>
Thanks for the clarification. I see that a default anyType is plugged
into the type definition hierarchy. Is this instance defined as a
constant in any of the XSD classes? If so, which one?

> Venkatesh Prasad Ranganath wrote:
>
>> Venkatesh Prasad Ranganath wrote:
>>
>> > Hi,
>> >
>> > I am trying to visit a schema as a tree. During the visit, the
>> > following procedure is called to visit complex type definition.
>> > visit(XSDComplexTypeDefinition type) {
>> > visit(type.getBaseTypeDefinition());
>> > ......
>> > }
>> >
>> > However, the same method is called recursively again with the same
>> > argument. In short, type.getBaseTypeDefinition() returned the object
>> > referred to by variable type. Is this the intended behavior? Or a
>> > bug in XSD? Or am I missing something?
>> >
>> > According to XSD specs, it should return the extension/restriction
>> > parent of the object bound to type and, if none exists, it should be
>> > anyType (as it is the root of the Type Hierarchy). Is this so? Or am
>> > I misreading the specs?
>> >
>> > waiting for reply,
>> >
>> Well, the object referred to by variable type represents anyType.
>> However, getBaseTypeDefinition() on it results in a reference to
>> itself. Now, is this the intended behavior as it violates the "root"
>> property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
>> object that represents anyType return null?
>>
>> waiting for reply,
>>
>> --
>>
>> Venkatesh Prasad Ranganath,
>> Dept. Computing and Information Science,
>> Kansas State University, US.
>> web: http://www.cis.ksu.edu/~rvprasad
>> <http://www.cis.ksu.edu/%7Ervprasad>
>>


--

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad
Re: BaseType of a underived ComplexType [message #587804 is a reply to message #46291] Thu, 27 May 2004 16:43 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25939
Registered: July 2009
Senior Member
--------------62E444AA84B7043313137BA2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Venkatesh,

No. Normally you'd get it like this:

xsdSchema.getSchemaForSchema().resolveComplexTypeDefinition( "anyType");

The schema for schema is a shared instance based on the schema for schema namespace
used by the schema. Note that there are recognizers like XSDUtil.isURType for
testing if you have one of these special any types...


Venkatesh Prasad Ranganath wrote:

> Ed Merks wrote:
>
> > Venkatesh,
> >
> > No, the base type of the anyType is itself as defined in the spec:
> >
> > http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition
> >
> >
> Thanks for the clarification. I see that a default anyType is plugged
> into the type definition hierarchy. Is this instance defined as a
> constant in any of the XSD classes? If so, which one?
>
> > Venkatesh Prasad Ranganath wrote:
> >
> >> Venkatesh Prasad Ranganath wrote:
> >>
> >> > Hi,
> >> >
> >> > I am trying to visit a schema as a tree. During the visit, the
> >> > following procedure is called to visit complex type definition.
> >> > visit(XSDComplexTypeDefinition type) {
> >> > visit(type.getBaseTypeDefinition());
> >> > ......
> >> > }
> >> >
> >> > However, the same method is called recursively again with the same
> >> > argument. In short, type.getBaseTypeDefinition() returned the object
> >> > referred to by variable type. Is this the intended behavior? Or a
> >> > bug in XSD? Or am I missing something?
> >> >
> >> > According to XSD specs, it should return the extension/restriction
> >> > parent of the object bound to type and, if none exists, it should be
> >> > anyType (as it is the root of the Type Hierarchy). Is this so? Or am
> >> > I misreading the specs?
> >> >
> >> > waiting for reply,
> >> >
> >> Well, the object referred to by variable type represents anyType.
> >> However, getBaseTypeDefinition() on it results in a reference to
> >> itself. Now, is this the intended behavior as it violates the "root"
> >> property of the Type Hierarchy? Shouldn't getBaseTypeDefinition() on an
> >> object that represents anyType return null?
> >>
> >> waiting for reply,
> >>
> >> --
> >>
> >> Venkatesh Prasad Ranganath,
> >> Dept. Computing and Information Science,
> >> Kansas State University, US.
> >> web: http://www.cis.ksu.edu/~rvprasad
> >> <http://www.cis.ksu.edu/%7Ervprasad>
> >>
>
> --
>
> Venkatesh Prasad Ranganath,
> Dept. Computing and Information Science,
> Kansas State University, US.
> web: http://www.cis.ksu.edu/~rvprasad

--------------62E444AA84B7043313137BA2
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Venkatesh,
<p>No.&nbsp; Normally you'd get it like this:
<blockquote> &nbsp;xsdSchema.getSchemaForSchema().resolveComplexTypeD efinition( "anyType");</blockquote>
The schema for schema is a shared instance based on the schema for schema
namespace used by the schema.&nbsp; Note that there are recognizers like
XSDUtil.isURType for testing if you have one of these special any types...
<br>&nbsp;
<p>Venkatesh Prasad Ranganath wrote:
<blockquote TYPE=CITE>Ed Merks wrote:
<p>> Venkatesh,
<br>>
<br>> No, the base type of the anyType is itself as defined in the spec:
<br>>
<br>>&nbsp;&nbsp;&nbsp;&nbsp; <a href=" http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition"> http://www.w3.org/TR/xmlschema-1/#section-Built-in-Complex-T ype-Definition</a>
<br>>
<br>>
<br>Thanks for the clarification.&nbsp; I see that a default anyType is
plugged
<br>into the type definition hierarchy.&nbsp; Is this instance defined
as a
<br>constant in any of the XSD classes?&nbsp; If so, which one?
<p>> Venkatesh Prasad Ranganath wrote:
<br>>
<br>>> Venkatesh Prasad Ranganath wrote:
<br>>>
<br>>> > Hi,
<br>>> >
<br>>> > I am trying to visit a schema as a tree.&nbsp; During the visit,&nbsp;
the
<br>>> > following procedure is called to visit complex type definition.
<br>>> > visit(XSDComplexTypeDefinition type) {
<br>>> >&nbsp;&nbsp;&nbsp; visit(type.getBaseTypeDefinition());
<br>>> >&nbsp;&nbsp;&nbsp; ......
<br>>> > }
<br>>> >
<br>>> > However, the same method is called recursively again with the
same
<br>>> > argument.&nbsp; In short, type.getBaseTypeDefinition() returned
the object
<br>>> > referred to by variable type.&nbsp; Is this the intended behavior?&nbsp;
Or a
<br>>> > bug in XSD?&nbsp; Or am I missing something?
<br>>> >
<br>>> > According to XSD specs, it should return the extension/restriction
<br>>> > parent of the object bound to type and, if none exists, it should
be
<br>>> > anyType (as it is the root of the Type Hierarchy).&nbsp; Is this
so?&nbsp; Or am
<br>>> > I misreading the specs?
<br>>> >
<br>>> > waiting for reply,
<br>>> >
<br>>> Well, the object referred to by variable type represents anyType.
<br>>> However, getBaseTypeDefinition() on it results in a reference to
<br>>> itself.&nbsp; Now, is this the intended behavior as it violates
the "root"
<br>>> property of the Type Hierarchy?&nbsp; Shouldn't getBaseTypeDefinition()
on an
<br>>> object that represents anyType return null?
<br>>>
<br>>> waiting for reply,
<br>>>
<br>>> --
<br>>>
<br>>> Venkatesh Prasad Ranganath,
<br>>> Dept. Computing and Information Science,
<br>>> Kansas State University, US.
<br>>> web: <a href="http://www.cis.ksu.edu/~rvprasad">http://www.cis.ksu.edu/~rvprasad</a>
<br>>> &lt;<a href="http://www.cis.ksu.edu/%7Ervprasad">http://www.cis.ksu.edu/%7Ervprasad</a>>
<br>>>
<p>--
<p>Venkatesh Prasad Ranganath,
<br>Dept. Computing and Information Science,
<br>Kansas State University, US.
<br>web: <a href="http://www.cis.ksu.edu/~rvprasad">http://www.cis.ksu.edu/~rvprasad</a></blockquote>
</html>

--------------62E444AA84B7043313137BA2--
Previous Topic:Schema has not been resolved
Next Topic:eclipse ide and xsd plug-ins
Goto Forum:
  


Current Time: Tue Jul 29 09:01:36 EDT 2014

Powered by FUDForum. Page generated in 0.04443 seconds