OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML Schema help

[ Lists Home | Date Index | Thread Index ]
  • To: <xml-dev@lists.xml.org>
  • Subject: XML Schema help
  • From: <sharma.tarun@wipro.com>
  • Date: Thu, 19 Jan 2006 17:50:39 +0530
  • Importance: high
  • Priority: Urgent
  • Thread-index: AcY1TQZTctq5XOpwQ6GcyEXum2ApNg==
  • Thread-topic: XML Schema help

Hi,

I am very new user of XML and first time writing some XML schema for parsing commands input as well as response. My commands have some structure like this:

RUNTCP:PORT=124,IP1=192,IP2=168,IP3=10,IP4=12,RIP=”230.164.12.8”

 

The requirement is such that I need to generate commands from the given attributes or parameters.  The whole program should be independent of the commands and their parameters.

 

Similarly I get the output in following format

 

RUNTCP OUTPUT DATA

 

PORT   IP1    IP2    IP3    IP4 

Port1   ip1      ip2    ip3     ip4

.

.

.

.

.

ERROR CODE

BROKEN PIPE

END

 

The other example could be

 

GETTCP

PORT   IP1    IP2    IP3    IP4 

Port1   ip1      ip2    ip3     ip4

 

Port2

 

Port3

.

.

.

.

.

NONE

ERROR CODE

BROKEN PIPE

END

 

Only ports are getting repeated in this case.

 

 

 

Which means that the output will give us some parameters and it can give some errors like ERROR CODE

 or BROKEN PIPE  etc. Finally it ends with the end.

 

 

 

I also need to parse this output to get the desired results. Here is the example schema I wrote for the output:

<?xml version="1.0" ?>

- <GATEWAY>

- <command name="RUNTCP" versions="4.0">

   - <output start=" RUNTCP OUTPUT DATA" end="END" none="NONE" error="ERROR CODE" bp="BROKEN PIPE">

            - <section start="MG" end="MG" repeatable="yes" mandatory="yes">

                        - <paramset start="PORT" mandatory="yes">

                                    <param name="PORT" key="yes" mandatory="yes" />

                        </paramset>

 

                        - <paramset start="IP1" mandatory="yes">

                                    <param name="IP1" mandatory="yes" />

                        </paramset>

 

                        - <paramset start="IP2" mandatory="yes">

                                    <param name="IP2" mandatory="yes" />

                        </paramset>

           

                        - <paramset start="IP3" mandatory="no">

                                    <param name="IP3" mandatory="yes" />

                        </paramset>

           

                        - <paramset start="IP4" mandatory="no">

                                    <param name="IP4" mandatory="yes" />

                        </paramset>

             </section>

  </printout>

 </command>

 

Can anybody suggest me some solution schema for it.

 

 

Thanks in advance

Regards

Tarun sharma


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS