xml - Getting relation name and attribute names from xsd file -



xml - Getting relation name and attribute names from xsd file -

i want column names , main name (table name) xsd file need write proper parser next iso standard or can search xsd pattern "name=" job details of schema. please help. sample xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns="http://www.opentravel.org/ota/2003/05" targetnamespace="http://www.opentravel.org/ota/2003/05" elementformdefault="qualified" version="1.00" id="ota2010b"> <xs:include schemalocation="fastrezota_simpletypes.xsd"/> <xs:annotation> <xs:documentation xml:lang="en">all schema files in opentravel alliance specification made available according terms defined opentravel license understanding @ http://www.opentravel.org/specifications/default.aspx.</xs:documentation> </xs:annotation> <xs:annotation> <xs:documentation>the key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may" , "optional" in document interpreted described in rfc 2199.</xs:documentation> </xs:annotation> <xs:element name="ota_cancelrq"> <xs:annotation> <xs:documentation xml:lang="en">the cancel request used request cancellation of reservation. confirmation number of reservation guest's lastly name must provided in order process request.</xs:documentation> </xs:annotation> <xs:complextype> <xs:sequence> <xs:element name="pos"> <xs:annotation> <xs:documentation>the pos must identify party or connection channel making request.</xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> <xs:sequence> <xs:element name="source"> <xs:annotation> <xs:documentation>source must used specify details regarding requestor. </xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> <xs:sequence> <xs:element name="requestorid"> <xs:annotation> <xs:documentation>requestorid must contain globally unique identifier of entity making request (e.g. ata/iata/id number, electronic reservation service provider (ersp), association of british travel agents (abta)). combination of @id , @id_context must unique.</xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> use="required"> <xs:annotation> <xs:documentation xml:lang="en">the type identifies id , must refer opentravel code list unique id type (uit).</xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> </xs:attribute> <xs:attribute name="id" type="stringlength1to32" use="required"> <xs:annotation> <xs:documentation xml:lang="en">id must contain unique identifying value requestor within scope of id_context.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="id_context" type="stringlength1to32" use="required"> <xs:annotation> <xs:documentation xml:lang="en">id_context must identify authoritative source of id (e.g., iata, abta).</xs:documentation> </xs:annotation> </xs:attribute> </xs:complextype> </xs:element> </xs:sequence> <xs:attribute name="isocountry" type="iso3166" use="required"> <xs:annotation> <xs:documentation xml:lang="en">isocountry identifies country code of requesting party , must conform iso-3166. country code of requesting party may used refine responses hence should reflect origin of guest.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="isocurrency" type="alphalength3" use="required"> <xs:annotation> <xs:documentation xml:lang="en">isocurrency must conform iso 4217, 3 character codes. opentravel recommends same currency code used in response, responses may returned in valid currency.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complextype> </xs:element> </xs:sequence> </xs:complextype> </xs:element> <xs:element name="uniqueid"> <xs:annotation> <xs:documentation>uniqueid must contain booking reference active reservation cancelled. combination of @id , @id_context must unique lifetime of reservation.</xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> <xs:attribute name="type" type="ota_codetype" use="required"> <xs:annotation> <xs:documentation xml:lang="en">the type specifies type of id , must refer opentravel code list unique id type (uit). fastrez recommends restricting utilize of code table code 14 - reservation.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="id" type="stringlength1to32" use="required"> <xs:annotation> <xs:documentation xml:lang="en">id must contain unique identifying value reservation within scope of id_context.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="id_context" type="stringlength1to32" use="required"> <xs:annotation> <xs:documentation xml:lang="en">id context must identify authoritative source of id (e.g., iata, abta).</xs:documentation> </xs:annotation> </xs:attribute> </xs:complextype> </xs:element> <xs:element name="verification"> <xs:annotation> <xs:documentation>reservation ids may reused. hence verification must used provide means assert reservation beingness cancelled intended reservation.</xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> <xs:sequence> <xs:element name="personname"> <xs:annotation> <xs:documentation>name info must provided in order verify right reservation beingness cancelled.</xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> <xs:sequence> <xs:element name="surname" type="stringlength1to64"> <xs:annotation> <xs:documentation xml:lang="en">surname must contain family name (last name) of invitee found on reservation.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complextype> </xs:element> </xs:sequence> </xs:complextype> </xs:element> <xs:element name="reasons" minoccurs="0"> <xs:annotation> <xs:documentation xml:lang="en">for reference purposes cancel request may contain collection of reasons cancellation.</xs:documentation> </xs:annotation> </xs:complextype> <xs:complextype> <xs:sequence> <xs:element name="reason" type="xs:string" maxoccurs="5"> <xs:annotation> <xs:documentation xml:lang="en">reason must contain reason cancellation.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complextype> </xs:element> </xs:sequence> <xs:attribute name="echotoken" type="stringlength1to128" use="optional"> <xs:annotation> <xs:documentation xml:lang="en">echotoken may provide reference additional message identification, assigned requesting host system. attribute should not used maintain state, should used diagnostic purposes. when request message includes echo token corresponding response message must include echo token identical value.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="timestamp" type="xs:datetime" use="required"> <xs:annotation> <xs:documentation xml:lang="en">timestamp must indicate creation date , time of message in utc using next format specified iso 8601; yyyy-mm-ddthh:mm:ssz time values using 24 hr clock (e.g. 20 nov 2003, 1:59:38 pm utc becomes 2003-11-20t13:59:38z).</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="version" type="xs:decimal" use="required"> <xs:annotation> <xs:documentation xml:lang="en">version must consistent underlying schema baseline.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="primarylangid" type="xs:language" use="required"> <xs:annotation> <xs:documentation xml:lang="en">primarylangid code must conform iso 639 language codes. code must define language of request. fastrez recommends response should match request, response may utilize language recognized iso 639.</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="canceltype" use="required"> <xs:annotation> <xs:documentation xml:lang="en">canceltype identifies type of cancellation. fastrez canceltype must cancel.</xs:documentation> </xs:annotation> <xs:simpletype> <xs:restriction base="xs:string"> <xs:enumeration value="cancel"> <xs:annotation> <xs:documentation xml:lang="en">cancellation</xs:documentation> </xs:annotation> </xs:enumeration> </xs:restriction> </xs:simpletype> </xs:attribute> </xs:complextype> </xs:element> </xs:schema>

xml xsd lxml

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -