Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Parse XSD from the WTP plugins.
Parse XSD from the WTP plugins. [message #480755] Tue, 18 August 2009 08:34 Go to next message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi,

Sub: I want to parse my xsd file using the parser that WTP provides.

I have some overlay elements in my xsd.Hence the parser that we currently
use in the Project is not showing the element (Overlayed element).

When I open the xsd with the "XML Schema Editor" that WTP supports in
Eclipse, I can see the overlayed element.

Hence I want to parse my xsd with the parser that WTP provides and list
all the elements to see how it resolves the overlay.

I'm not sure which plugin/file in WTP is responsible for parsing and
showing the "XML Schema Editor" in Eclipse.

Any help would be greatly appreciated.
Thanks in advance,
Smitha.
Re: Parse XSD from the WTP plugins. [message #480768 is a reply to message #480755] Tue, 18 August 2009 08:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

I'm pretty sure that the XSD editor uses EMF's XSDResourceImpl to parse
instances. The XSD model acts as a wrapper around the DOM, so for any
XSD component, it's possible to get at the DOM Element it wraps. The
WTP's schema editor uses the SSE DOM to display the DOM in a source view
and uses the XSD model for the outline (as far as I remember). It's
best to ask about the editor's aspects on the WTP newsgroup...


Smitha wrote:
> Hi,
>
> Sub: I want to parse my xsd file using the parser that WTP provides.
>
> I have some overlay elements in my xsd.Hence the parser that we
> currently use in the Project is not showing the element (Overlayed
> element).
>
> When I open the xsd with the "XML Schema Editor" that WTP supports in
> Eclipse, I can see the overlayed element.
>
> Hence I want to parse my xsd with the parser that WTP provides and
> list all the elements to see how it resolves the overlay.
>
> I'm not sure which plugin/file in WTP is responsible for parsing and
> showing the "XML Schema Editor" in Eclipse.
> Any help would be greatly appreciated.
> Thanks in advance,
> Smitha.
>
>
Re: Parse XSD from the WTP plugins. [message #481042 is a reply to message #480768] Wed, 19 August 2009 08:14 Go to previous messageGo to next message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

Thanks a lot for the reply.
But the issue is that WTP is able to show the extended elements (overlayed
elements); where as we are not able to see it. Is there any other
configuration/variable that has to be set to see the extended elements?

I have also posted this query in WTP newsgroup.
Any inputs from your side would be very helpful.

Thanks & Regards,
Smitha
Re: Parse XSD from the WTP plugins. [message #481046 is a reply to message #481042] Wed, 19 August 2009 08:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Comments below.

Smitha wrote:
> Hi Ed,
>
> Thanks a lot for the reply.
> But the issue is that WTP is able to show the extended elements
> (overlayed elements);
I don't know what the mean. The contents of appinfo/documentation elements?
> where as we are not able to see it.
What does seeing it mean. You've not explaining anything about what
you're doing now so I haven't a clue what that might be or what your
comment means.
> Is there any other configuration/variable that has to be set to see
> the extended elements?
Perhaps you'd like to show a sample schema that illustrates these
extended elements so I know what you're talking about.
>
> I have also posted this query in WTP newsgroup.
Yes, but it was the same question and likely will result in little in
the way of a useful answer because in the end, they will answer that
they use XSDResourceImpl and DOM...
> Any inputs from your side would be very helpful.
More information on your side would be helpful too.
>
> Thanks & Regards,
> Smitha
>
>
Re: Parse XSD from the WTP plugins. [message #481443 is a reply to message #481046] Fri, 21 August 2009 00:02 Go to previous messageGo to next message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

What we are trying to do is to create an xsl tree out of a set of XSDs.
During this process Some of the elements are missing in the tree.

The main reason behind this is I think the "Extension base" which is
present in the xsd elements as shown below.

<xs:element name="Sender" type="SenderType" substitutionGroup="oa:Sender"/>

<xs:complexType name="SenderType">

<xs:complexContent>

<xs:extension base="oa:SenderType">

<xs:sequence>

<xs:element ref="MessageControlData" minOccurs="0"/>

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>


It is able to resolve (and show in the xsl tree structure) a few elements
which are inherited by restriction but is not able to resolve the element
"MessageControlData" which is inherited by extension.

The WTP parser is able to parse both and show in the Design View. I think
we are missing something while parsing the xsds.

I have sent the files to your gmail ID.

It will be nice if you could let me know if we have a special way of
parsing/resolving the extension-base

Thank you for your help.
Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #481452 is a reply to message #481443] Fri, 21 August 2009 02:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000107010905010804090704
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Smitha,

I tried using XSDMainExample to validate the schemas you sent:

-validate
jar:file:/c:/stuff/OAGIS.zip!/OAGIS/ProcessRemittanceAdvice. xsd

If you have the SDK installed, you can use "New Example" to create the
"XML Schema Example". Note that it's important to load the schema using
an absolute URI in order for relative imports/includes to resolve properly.


Smitha wrote:
> Hi Ed,
>
> What we are trying to do is to create an xsl tree out of a set of
> XSDs. During this process Some of the elements are missing in the tree.
> The main reason behind this is I think the "Extension base" which is
> present in the xsd elements as shown below.
>
> <xs:element name="Sender" type="SenderType"
> substitutionGroup="oa:Sender"/>
>
> <xs:complexType name="SenderType">
>
> <xs:complexContent>
>
> <xs:extension base="oa:SenderType">
>
> <xs:sequence>
>
> <xs:element ref="MessageControlData" minOccurs="0"/>
>
> </xs:sequence>
>
> </xs:extension>
>
> </xs:complexContent>
>
> </xs:complexType>
>
>
> It is able to resolve (and show in the xsl tree structure) a few
> elements which are inherited by restriction but is not able to resolve
> the element "MessageControlData" which is inherited by extension.
>
> The WTP parser is able to parse both and show in the Design View. I
> think we are missing something while parsing the xsds.
> I have sent the files to your gmail ID.
>
> It will be nice if you could let me know if we have a special way of
> parsing/resolving the extension-base
>
> Thank you for your help.
> Thanks & Regards,
> Smitha.
>
>
>

--------------000107010905010804090704
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Smitha,<br>
<br>
I tried using XSDMainExample to validate the schemas you sent:<br>
<blockquote>-validate
<a class="moz-txt-link-freetext" href=" jar:file:/c:/stuff/OAGIS.zip!/OAGIS/ProcessRemittanceAdvice. xsd "> jar:file:/c:/stuff/OAGIS.zip!/OAGIS/ProcessRemittanceAdvice. xsd </a><br>
</blockquote>
If you have the SDK installed, you can use "New Example" to create the
"XML Schema Example".
Re: Parse XSD from the WTP plugins. [message #481492 is a reply to message #481452] Fri, 21 August 2009 05:28 Go to previous messageGo to next message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

I have validated the schema and the imports are also resolved fine.

I could explain the flow of elements in the xsds and also the element
which is not getting resolved and not shown in the tree structure.

The flow is as follows:
1. The root element is considered first which is "ProcessRemittanceAdvice"
from the OAGIS/ProcessRemittanceAdvice.xsd.
2. It is of type ProcessRemittanceAdviceType. It traverses to the complex
type with that name and it has oa:BusinessObjectDocumentType.This goes to
OAGIS\www.openapplications.org_oagis_9\ProcessRemittanceAdvi ce.xsd.
3. There the ApplicationArea is resolved which is <xsd:element
ref="ApplicationArea"/>
4. ApplicationArea is of ApplicationAreaType Its elements are resolved
which are Sender
5. Sender is a ref which is of type SenderType.
6. SenderType has
LogicalID,ComponentID,TaskID,ReferenceID,ConfirmationCode &
AuthorizationID.
7. But when we come back to the main xsd now, we have the following
element which is not in the flow but related/ inherited by extension.
While parsing the xsd's I'm not able to get the MessageControlData
element.

This element is visible in the WTP editor. As shown in the image that I
mailed you yesterday.

<xs:element name="Sender" type="SenderType" substitutionGroup="oa:Sender"/>
<xs:complexType name="SenderType">
<xs:complexContent>
<xs:extension base="oa:SenderType">
<xs:sequence>
<xs:element ref="MessageControlData" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>


Could you please let me know how I could link this MessageControlData to
the Sender element even though it is not present in the flow?

Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #481495 is a reply to message #481492] Fri, 21 August 2009 05:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Comments below.

Smitha wrote:
> Hi Ed,
>
> I have validated the schema and the imports are also resolved fine.
>
> I could explain the flow of elements in the xsds and also the element
> which is not getting resolved and not shown in the tree structure.
If something wasn't resolved, that would lead to a validation error...
>
> The flow is as follows:
> 1. The root element is considered first which is
> "ProcessRemittanceAdvice" from the OAGIS/ProcessRemittanceAdvice.xsd.
> 2. It is of type ProcessRemittanceAdviceType. It traverses to the
> complex type with that name and it has
> oa:BusinessObjectDocumentType.This goes to
> OAGIS\www.openapplications.org_oagis_9\ProcessRemittanceAdvi ce.xsd.
> 3. There the ApplicationArea is resolved which is <xsd:element
> ref="ApplicationArea"/>
> 4. ApplicationArea is of ApplicationAreaType Its elements are resolved
> which are Sender
> 5. Sender is a ref which is of type SenderType.
> 6. SenderType has
> LogicalID,ComponentID,TaskID,ReferenceID,ConfirmationCode &
> AuthorizationID.
> 7. But when we come back to the main xsd now,
What does this "come back to the main xsd now" mean? It sounds kind of
like you want to know about the subtype when you're looking at the base
type, but there can be many subtypes so there's no a way to traverse to
it from the base type itself.
> we have the following element which is not in the flow but related/
> inherited by extension. While parsing the xsd's I'm not able to get
> the MessageControlData element.
> This element is visible in the WTP editor. As shown in the image that
> I mailed you yesterday.
>
> <xs:element name="Sender" type="SenderType"
> substitutionGroup="oa:Sender"/>
> <xs:complexType name="SenderType">
> <xs:complexContent>
> <xs:extension base="oa:SenderType">
> <xs:sequence>
> <xs:element ref="MessageControlData" minOccurs="0"/>
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
>
>
> Could you please let me know how I could link this MessageControlData
> to the Sender element even though it is not present in the flow?
> Thanks & Regards,
> Smitha.
>
>
Re: Parse XSD from the WTP plugins. [message #481719 is a reply to message #481495] Mon, 24 August 2009 01:45 Go to previous messageGo to next message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

The flow is as follows:

Root Name (ProcessRemittanceAdvice)
First Child (ApplicationArea from imported schema)
First Grand Child (Sender from inported schema)
First Grand Extended Child (Sender which has
MessageControlData which is from the root schema)
Second Child (.....)


Could you please explain to me how to resolve the "First Grand Extended
Child".
I'm not able to get this element when I parse the main (root) schema.

Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #481734 is a reply to message #481719] Mon, 24 August 2009 03:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Generally you can look things up given their namespace and name by
finding the schema with that target namespace and looking up the entity
with that name. If you know the context (the complex type) you can
search it's particles for local elements visible in that context.


Smitha wrote:
> Hi Ed,
>
> The flow is as follows:
>
> Root Name (ProcessRemittanceAdvice)
> First Child (ApplicationArea from imported schema)
> First Grand Child (Sender from inported schema)
> First Grand Extended Child (Sender which has
> MessageControlData which is from the root schema)
> Second Child (.....)
>
>
> Could you please explain to me how to resolve the "First Grand
> Extended Child".
> I'm not able to get this element when I parse the main (root) schema.
>
> Thanks & Regards,
> Smitha.
>
>
>
>
>
>
>
Re: Parse XSD from the WTP plugins. [message #481812 is a reply to message #481734] Mon, 24 August 2009 08:00 Go to previous messageGo to next message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

Thank you for your response.

We have tried all possible ways to parse & read xsd's and get the extended
elements but we can't reach the extended elements :(
We are not sure if the parsers that we are using right now is capable of
doing that.We are using the "org.eclipse.xsd" jar. We are working on an
xml based product which is stable & has been working fine with this parser
for a long time now. But these new types of xsds are creating an issue
for our customers.

I had mailed the sample files to your gmail ID on Aug 20 2009.

Could you please provide me with a sample which could do that if you are
free?

This would help us a lot. Thanks in advance.


Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #481978 is a reply to message #481812] Mon, 24 August 2009 18:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Comments below.

Smitha wrote:
> Hi Ed,
>
> Thank you for your response.
> We have tried all possible ways to parse & read xsd's and get the
> extended elements but we can't reach the extended elements :(
The problem is that your questions are very vague to me. You talk about
parsing the XSD when it sounds more like you are traversing something
that parsed just fine. You seem to have an instance file and are trying
to map it back to schema information, but you don't show an actual
instance file and only snips of the schemas...
> We are not sure if the parsers that we are using right now is capable
> of doing that.We are using the "org.eclipse.xsd" jar. We are working
> on an xml based product which is stable & has been working fine with
> this parser for a long time now. But these new types of xsds are
> creating an issue for our customers.
I assume customers pay you money, but when I provide help here, that
doesn't pay any money, it only uses up my time...
>
> I had mailed the sample files to your gmail ID on Aug 20 2009.
>
> Could you please provide me with a sample which could do that if you
> are free?
I have very little time these days so the best I can do is provide quick
answers to specific questions...
> This would help us a lot. Thanks in advance.
>
>
> Thanks & Regards,
> Smitha.
>
>
Re: Parse XSD from the WTP plugins. [message #482005 is a reply to message #481978] Tue, 25 August 2009 01:56 Go to previous messageGo to next message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

Thanks a lot for your response. I really appreciate your efforts in
answering my mails.I'm really grateful to you.

With the inputs that you have provided, I will analyse the wtp parser and
modify ours to read the extended elements.

Thanks once again for your help.Very much appreciated.

Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #484983 is a reply to message #482005] Thu, 10 September 2009 02:15 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

I was able to get a solution for the same.The overlayed/extended element
for the element that I was mentioning is available in the substitutable
element for the node.

Hence programatically I'm substituting the node with its substitutable
element.

Thanks & Regards,
Smitha
Re: Parse XSD from the WTP plugins. [message #604301 is a reply to message #480755] Tue, 18 August 2009 08:47 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

I'm pretty sure that the XSD editor uses EMF's XSDResourceImpl to parse
instances. The XSD model acts as a wrapper around the DOM, so for any
XSD component, it's possible to get at the DOM Element it wraps. The
WTP's schema editor uses the SSE DOM to display the DOM in a source view
and uses the XSD model for the outline (as far as I remember). It's
best to ask about the editor's aspects on the WTP newsgroup...


Smitha wrote:
> Hi,
>
> Sub: I want to parse my xsd file using the parser that WTP provides.
>
> I have some overlay elements in my xsd.Hence the parser that we
> currently use in the Project is not showing the element (Overlayed
> element).
>
> When I open the xsd with the "XML Schema Editor" that WTP supports in
> Eclipse, I can see the overlayed element.
>
> Hence I want to parse my xsd with the parser that WTP provides and
> list all the elements to see how it resolves the overlay.
>
> I'm not sure which plugin/file in WTP is responsible for parsing and
> showing the "XML Schema Editor" in Eclipse.
> Any help would be greatly appreciated.
> Thanks in advance,
> Smitha.
>
>
Re: Parse XSD from the WTP plugins. [message #604308 is a reply to message #480768] Wed, 19 August 2009 08:14 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

Thanks a lot for the reply.
But the issue is that WTP is able to show the extended elements (overlayed
elements); where as we are not able to see it. Is there any other
configuration/variable that has to be set to see the extended elements?

I have also posted this query in WTP newsgroup.
Any inputs from your side would be very helpful.

Thanks & Regards,
Smitha
Re: Parse XSD from the WTP plugins. [message #604310 is a reply to message #481042] Wed, 19 August 2009 08:23 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Comments below.

Smitha wrote:
> Hi Ed,
>
> Thanks a lot for the reply.
> But the issue is that WTP is able to show the extended elements
> (overlayed elements);
I don't know what the mean. The contents of appinfo/documentation elements?
> where as we are not able to see it.
What does seeing it mean. You've not explaining anything about what
you're doing now so I haven't a clue what that might be or what your
comment means.
> Is there any other configuration/variable that has to be set to see
> the extended elements?
Perhaps you'd like to show a sample schema that illustrates these
extended elements so I know what you're talking about.
>
> I have also posted this query in WTP newsgroup.
Yes, but it was the same question and likely will result in little in
the way of a useful answer because in the end, they will answer that
they use XSDResourceImpl and DOM...
> Any inputs from your side would be very helpful.
More information on your side would be helpful too.
>
> Thanks & Regards,
> Smitha
>
>
Re: Parse XSD from the WTP plugins. [message #604316 is a reply to message #481046] Fri, 21 August 2009 00:02 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

What we are trying to do is to create an xsl tree out of a set of XSDs.
During this process Some of the elements are missing in the tree.

The main reason behind this is I think the "Extension base" which is
present in the xsd elements as shown below.

<xs:element name="Sender" type="SenderType" substitutionGroup="oa:Sender"/>

<xs:complexType name="SenderType">

<xs:complexContent>

<xs:extension base="oa:SenderType">

<xs:sequence>

<xs:element ref="MessageControlData" minOccurs="0"/>

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>


It is able to resolve (and show in the xsl tree structure) a few elements
which are inherited by restriction but is not able to resolve the element
"MessageControlData" which is inherited by extension.

The WTP parser is able to parse both and show in the Design View. I think
we are missing something while parsing the xsds.

I have sent the files to your gmail ID.

It will be nice if you could let me know if we have a special way of
parsing/resolving the extension-base

Thank you for your help.
Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #604319 is a reply to message #481443] Fri, 21 August 2009 02:06 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000107010905010804090704
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Smitha,

I tried using XSDMainExample to validate the schemas you sent:

-validate
jar:file:/c:/stuff/OAGIS.zip!/OAGIS/ProcessRemittanceAdvice. xsd

If you have the SDK installed, you can use "New Example" to create the
"XML Schema Example". Note that it's important to load the schema using
an absolute URI in order for relative imports/includes to resolve properly.


Smitha wrote:
> Hi Ed,
>
> What we are trying to do is to create an xsl tree out of a set of
> XSDs. During this process Some of the elements are missing in the tree.
> The main reason behind this is I think the "Extension base" which is
> present in the xsd elements as shown below.
>
> <xs:element name="Sender" type="SenderType"
> substitutionGroup="oa:Sender"/>
>
> <xs:complexType name="SenderType">
>
> <xs:complexContent>
>
> <xs:extension base="oa:SenderType">
>
> <xs:sequence>
>
> <xs:element ref="MessageControlData" minOccurs="0"/>
>
> </xs:sequence>
>
> </xs:extension>
>
> </xs:complexContent>
>
> </xs:complexType>
>
>
> It is able to resolve (and show in the xsl tree structure) a few
> elements which are inherited by restriction but is not able to resolve
> the element "MessageControlData" which is inherited by extension.
>
> The WTP parser is able to parse both and show in the Design View. I
> think we are missing something while parsing the xsds.
> I have sent the files to your gmail ID.
>
> It will be nice if you could let me know if we have a special way of
> parsing/resolving the extension-base
>
> Thank you for your help.
> Thanks & Regards,
> Smitha.
>
>
>

--------------000107010905010804090704
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Smitha,<br>
<br>
I tried using XSDMainExample to validate the schemas you sent:<br>
<blockquote>-validate
<a class="moz-txt-link-freetext" href=" jar:file:/c:/stuff/OAGIS.zip!/OAGIS/ProcessRemittanceAdvice. xsd "> jar:file:/c:/stuff/OAGIS.zip!/OAGIS/ProcessRemittanceAdvice. xsd </a><br>
</blockquote>
If you have the SDK installed, you can use "New Example" to create the
"XML Schema Example".
Re: Parse XSD from the WTP plugins. [message #604321 is a reply to message #481452] Fri, 21 August 2009 05:28 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

I have validated the schema and the imports are also resolved fine.

I could explain the flow of elements in the xsds and also the element
which is not getting resolved and not shown in the tree structure.

The flow is as follows:
1. The root element is considered first which is "ProcessRemittanceAdvice"
from the OAGIS/ProcessRemittanceAdvice.xsd.
2. It is of type ProcessRemittanceAdviceType. It traverses to the complex
type with that name and it has oa:BusinessObjectDocumentType.This goes to
OAGIS\www.openapplications.org_oagis_9\ProcessRemittanceAdvi ce.xsd.
3. There the ApplicationArea is resolved which is <xsd:element
ref="ApplicationArea"/>
4. ApplicationArea is of ApplicationAreaType Its elements are resolved
which are Sender
5. Sender is a ref which is of type SenderType.
6. SenderType has
LogicalID,ComponentID,TaskID,ReferenceID,ConfirmationCode &
AuthorizationID.
7. But when we come back to the main xsd now, we have the following
element which is not in the flow but related/ inherited by extension.
While parsing the xsd's I'm not able to get the MessageControlData
element.

This element is visible in the WTP editor. As shown in the image that I
mailed you yesterday.

<xs:element name="Sender" type="SenderType" substitutionGroup="oa:Sender"/>
<xs:complexType name="SenderType">
<xs:complexContent>
<xs:extension base="oa:SenderType">
<xs:sequence>
<xs:element ref="MessageControlData" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>


Could you please let me know how I could link this MessageControlData to
the Sender element even though it is not present in the flow?

Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #604324 is a reply to message #481492] Fri, 21 August 2009 05:46 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Comments below.

Smitha wrote:
> Hi Ed,
>
> I have validated the schema and the imports are also resolved fine.
>
> I could explain the flow of elements in the xsds and also the element
> which is not getting resolved and not shown in the tree structure.
If something wasn't resolved, that would lead to a validation error...
>
> The flow is as follows:
> 1. The root element is considered first which is
> "ProcessRemittanceAdvice" from the OAGIS/ProcessRemittanceAdvice.xsd.
> 2. It is of type ProcessRemittanceAdviceType. It traverses to the
> complex type with that name and it has
> oa:BusinessObjectDocumentType.This goes to
> OAGIS\www.openapplications.org_oagis_9\ProcessRemittanceAdvi ce.xsd.
> 3. There the ApplicationArea is resolved which is <xsd:element
> ref="ApplicationArea"/>
> 4. ApplicationArea is of ApplicationAreaType Its elements are resolved
> which are Sender
> 5. Sender is a ref which is of type SenderType.
> 6. SenderType has
> LogicalID,ComponentID,TaskID,ReferenceID,ConfirmationCode &
> AuthorizationID.
> 7. But when we come back to the main xsd now,
What does this "come back to the main xsd now" mean? It sounds kind of
like you want to know about the subtype when you're looking at the base
type, but there can be many subtypes so there's no a way to traverse to
it from the base type itself.
> we have the following element which is not in the flow but related/
> inherited by extension. While parsing the xsd's I'm not able to get
> the MessageControlData element.
> This element is visible in the WTP editor. As shown in the image that
> I mailed you yesterday.
>
> <xs:element name="Sender" type="SenderType"
> substitutionGroup="oa:Sender"/>
> <xs:complexType name="SenderType">
> <xs:complexContent>
> <xs:extension base="oa:SenderType">
> <xs:sequence>
> <xs:element ref="MessageControlData" minOccurs="0"/>
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
>
>
> Could you please let me know how I could link this MessageControlData
> to the Sender element even though it is not present in the flow?
> Thanks & Regards,
> Smitha.
>
>
Re: Parse XSD from the WTP plugins. [message #604328 is a reply to message #481495] Mon, 24 August 2009 01:45 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

The flow is as follows:

Root Name (ProcessRemittanceAdvice)
First Child (ApplicationArea from imported schema)
First Grand Child (Sender from inported schema)
First Grand Extended Child (Sender which has
MessageControlData which is from the root schema)
Second Child (.....)


Could you please explain to me how to resolve the "First Grand Extended
Child".
I'm not able to get this element when I parse the main (root) schema.

Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #604332 is a reply to message #481719] Mon, 24 August 2009 03:04 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Generally you can look things up given their namespace and name by
finding the schema with that target namespace and looking up the entity
with that name. If you know the context (the complex type) you can
search it's particles for local elements visible in that context.


Smitha wrote:
> Hi Ed,
>
> The flow is as follows:
>
> Root Name (ProcessRemittanceAdvice)
> First Child (ApplicationArea from imported schema)
> First Grand Child (Sender from inported schema)
> First Grand Extended Child (Sender which has
> MessageControlData which is from the root schema)
> Second Child (.....)
>
>
> Could you please explain to me how to resolve the "First Grand
> Extended Child".
> I'm not able to get this element when I parse the main (root) schema.
>
> Thanks & Regards,
> Smitha.
>
>
>
>
>
>
>
Re: Parse XSD from the WTP plugins. [message #604338 is a reply to message #481734] Mon, 24 August 2009 08:00 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

Thank you for your response.

We have tried all possible ways to parse & read xsd's and get the extended
elements but we can't reach the extended elements :(
We are not sure if the parsers that we are using right now is capable of
doing that.We are using the "org.eclipse.xsd" jar. We are working on an
xml based product which is stable & has been working fine with this parser
for a long time now. But these new types of xsds are creating an issue
for our customers.

I had mailed the sample files to your gmail ID on Aug 20 2009.

Could you please provide me with a sample which could do that if you are
free?

This would help us a lot. Thanks in advance.


Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #604342 is a reply to message #481812] Mon, 24 August 2009 18:59 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Smitha,

Comments below.

Smitha wrote:
> Hi Ed,
>
> Thank you for your response.
> We have tried all possible ways to parse & read xsd's and get the
> extended elements but we can't reach the extended elements :(
The problem is that your questions are very vague to me. You talk about
parsing the XSD when it sounds more like you are traversing something
that parsed just fine. You seem to have an instance file and are trying
to map it back to schema information, but you don't show an actual
instance file and only snips of the schemas...
> We are not sure if the parsers that we are using right now is capable
> of doing that.We are using the "org.eclipse.xsd" jar. We are working
> on an xml based product which is stable & has been working fine with
> this parser for a long time now. But these new types of xsds are
> creating an issue for our customers.
I assume customers pay you money, but when I provide help here, that
doesn't pay any money, it only uses up my time...
>
> I had mailed the sample files to your gmail ID on Aug 20 2009.
>
> Could you please provide me with a sample which could do that if you
> are free?
I have very little time these days so the best I can do is provide quick
answers to specific questions...
> This would help us a lot. Thanks in advance.
>
>
> Thanks & Regards,
> Smitha.
>
>
Re: Parse XSD from the WTP plugins. [message #604346 is a reply to message #481978] Tue, 25 August 2009 01:56 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

Thanks a lot for your response. I really appreciate your efforts in
answering my mails.I'm really grateful to you.

With the inputs that you have provided, I will analyse the wtp parser and
modify ours to read the extended elements.

Thanks once again for your help.Very much appreciated.

Thanks & Regards,
Smitha.
Re: Parse XSD from the WTP plugins. [message #604350 is a reply to message #482005] Thu, 10 September 2009 02:15 Go to previous message
Smitha is currently offline Smitha
Messages: 21
Registered: July 2009
Junior Member
Hi Ed,

I was able to get a solution for the same.The overlayed/extended element
for the element that I was mentioning is available in the substitutable
element for the node.

Hence programatically I'm substituting the node with its substitutable
element.

Thanks & Regards,
Smitha
Previous Topic:Parse XSD from the WTP plugins.
Next Topic:key/keyref does not validate with recursion?
Goto Forum:
  


Current Time: Fri Aug 22 03:56:20 EDT 2014

Powered by FUDForum. Page generated in 0.02789 seconds