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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-ttsc message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: [ubl-ttsc] FW: First XML-Schemas


Hello Tools and Techniques Group,

now you'll get a short description of my XML-Schema.

Regards,

	Gunther
>  -----Original Message-----
> From: 	Stuhec, Gunther  
> Sent:	Montag, 17. Dezember 2001 22:42
> To:	'ubl-lcsc@lists.oasis-open.org'
> Subject:	FW: First XML-Schemas
> 
> I'am sorry, that I'am sending the same mail again. But on this mail, I
> have attached the mentioned zip-file.
> 
>  -----Original Message-----
> From: 	Stuhec, Gunther  
> Sent:	Montag, 17. Dezember 2001 22:40
> To:	'ubl-lcsc@lists.oasis-open.org'
> Subject:	First XML-Schemas
> 
> Hello LCSC-Group,
> 
> as discussed, I send you the first attachment of some XML-Schemas
> transformed by the following Excel-Sheets:
> - OrderSummary1.xls 
> - Revised Spreadsheet.xls (changed into OrderSummary2.xls)
> - UBL BIE catalog v0.2.xls (changed into UblBie2.xls)
> 
> If you have some more Excel-Sheets, please send it to me, I would like to
> transform this into XML Schema.
> 
> For the transforming I have written a perl-program. The perl-program
> extracts xsl-files of the UBL components into the following manner:
> 
> 
> - It sets "ubl" as prefix for the targetnamespace
> - It imports CoreComponentsTypes.xsd with namespace-prefix "cct" and
> CoreComponetsCatalogue with the namespace-prefix "cc". Both files must be
> placed in the same directory.
> - It collects each header names from the second row.
> 
> Each line will be processed as following described:
> - It creates one complexType if a value in cell of column "Entity Name"
> exists. All blanks, points and between each word will be deleted -> The
> "Entity Name" will be have a structure according UpperCamelCase then.
> Example: "Financial Account. Details" to "FinancialAccountDetails".
> - It generates an @id with the value from coloumn "UBL UID".
> - If the cell in column "DataType" or "Core Component type" respectively
> is not empty or is not the value "Elementtype",  a will "complexContent"
> inside of the complexType will be created. The extension element have
> derives to the referenced Core Component Type by attribute base
> "cct:<Elementtype>Type". For example:
> 
> 	<xsd:complexContent>
> 		<xsd:extension base="cct:CodeType"/>
> 	</xsd:complexContent>
> 
> - Otherwise, if cell in column "Contains UBL BIEs" or "Contains - UBL" or
> "Contains" is not empty, then it will be a "sequence" inside of the same
> "complexContent" will be created. For example:
> 
> 	<xsd:sequence>
> 		<xsd:element name="NumberOfLines" type="ubl:NumberOfLines"/>
> 		<xsd:element name="TotalTax" type="ubl:TotalTax"/>
> 		<xsd:element name="TotalAmount" type="ubl:TotalAmount"/>
> 		<xsd:element name="TransportPackagingTotals"
> type="ubl:TransportPackagingTotals"/>
> 		<xsd:element name="SummaryNote" type="ubl:SummaryNote"/>
> 	</xsd:sequence>
> 
> Remarks: The generated XML-schema will be not valid if the reference type
> not exist or is not written correctly according the "Entity Name".
> 
> For each information of all another columns it will be created a
> documentation element. It includes the attribute "source" and the language
> attribute "xml:lang". The source have the value "UBL <header name>". The
> <header name> is the header name of each relevant column. The language
> attribute is setted as "English". And the content will be represented as
> element content. For example:
> 
> 	<xsd:annotation>
> 		<xsd:documentation source="UBL xCBL Definition"
> xml:lang="en">
> 			Contains the detail of the rate of exchange between
> two currencies.
> 		</xsd:documentation>
> 		<xsd:documentation source="UBL Remarks" xml:lang="en">
> 			Details needed or used to make an exchange of an
> amount from one currency to 
> 			another (CC Definition)
> 		</xsd:documentation>
> 		<xsd:documentation source="UBL Object Class" xml:lang="en">
> 			CurrencyExchange
> 		</xsd:documentation>
> 		<xsd:documentation source="UBL Representation Term"
> xml:lang="en">
> 			Details
> 		</xsd:documentation>
> 		<xsd:documentation source="UBL xCBL Name" xml:lang="en">
> 			RateOfExchangeDetail
> 		</xsd:documentation>
> 		<xsd:documentation source="UBL Contained In - UBL BIEs"
> xml:lang="en">
> 			MonetaryValue
> 		</xsd:documentation>
> 		<xsd:documentation source="UBL Core Component UID"
> xml:lang="en">
> 			000136
> 		</xsd:documentation>
> 		<xsd:documentation source="UBL CCT Used" xml:lang="en">
> 			N/A
> 		</xsd:documentation>
> 	</xsd:annotation>
> 
> Remarks:
> The sequence and the number of the columns can be vary. The program
> generated a new documentation element for additional information according
> the description above.
> 
> The example for a complexType with sequence is:
> 
> <xsd:complexType name="CurrencyExchangeDetails" id="UBL000XXX">
> 	<xsd:annotation>
> 		<xsd:documentation source="UBL xCBL Definition"
> xml:lang="en">Contains the detail of the rate of exchange between two
> currencies.</xsd:documentation>
> 		<xsd:documentation source="UBL Remarks"
> xml:lang="en">Details needed or used to make an exchange of an amount from
> one currency to another (CC Definition)</xsd:documentation>
> 		<xsd:documentation source="UBL Object Class"
> xml:lang="en">CurrencyExchange</xsd:documentation>
> 		<xsd:documentation source="UBL Representation Term"
> xml:lang="en">Details</xsd:documentation>
> 		<xsd:documentation source="UBL xCBL Name"
> xml:lang="en">RateOfExchangeDetail</xsd:documentation>
> 		<xsd:documentation source="UBL Contained In - UBL BIEs"
> xml:lang="en">MonetaryValue</xsd:documentation>
> 		<xsd:documentation source="UBL Core Component UID"
> xml:lang="en">000136</xsd:documentation>
> 		<xsd:documentation source="UBL CCT Used"
> xml:lang="en">N/A</xsd:documentation>
> 	</xsd:annotation>
> 	<xsd:sequence>
> 		<xsd:element name="SourceCurrencyCode"
> type="ubl:SourceCurrencyCode"/>
> 		<xsd:element name="TargetCurrencyCode"
> type="ubl:TargetCurrencyCode"/>
> 		<xsd:element name="CurrencyExchangeRate"
> type="ubl:CurrencyExchangeRate"/>
> 	</xsd:sequence>
> </xsd:complexType>
> 
> And an example with an inherited base type is:
> 
> <xsd:complexType name="SourceCurrencyCode" id="UBL000XXX">
> 	<xsd:annotation>
> 		<xsd:documentation source="UBL Remarks" xml:lang="en">Code
> identifying the currency from which the exchange is being made (CC
> Definition)</xsd:documentation>
> 		<xsd:documentation source="UBL Object Class"
> xml:lang="en">Source</xsd:documentation>
> 		<xsd:documentation source="UBL Property Term"
> xml:lang="en">Currency</xsd:documentation>
> 		<xsd:documentation source="UBL Representation Term"
> xml:lang="en">Code</xsd:documentation>
> 		<xsd:documentation source="UBL xCBL Name"
> xml:lang="en">ReferenceCurrency</xsd:documentation>
> 		<xsd:documentation source="UBL Contained In - UBL BIEs"
> xml:lang="en">CurrencyExchangeDetails</xsd:documentation>
> 		<xsd:documentation source="UBL CCT Used"
> xml:lang="en">000137</xsd:documentation>
> 	</xsd:annotation>
> 	<xsd:complexContent>
> 		<xsd:extension base="cct:CodeType"/>
> 	</xsd:complexContent>
> </xsd:complexType>
> 
> 
> I put all generted XML-schemas into the attached files. There also a HTML
> based document of each XML-Schema in it. But this documentation is
> generated by the programm "XML Console" which is a component of "XML
> Turbo", because XML Spy could not generate any documentation of a not
> valid XML-Schema.
> 
> If you have some suggestions, improvements or modifications. I will put it
> into my perl-program immediately. I will send it out if this little
> programm is stable enough.
> 
> Regards,
> 
> 	Gunther
> 
> PS: The evaluation key of XML Spy is:
> 
> 
>      License: 4.0  Temporary Multi Suite for 15 users
> 
>      Company: UBL-Group
>      Key-Code: 9ksu92-XeCcq5-buSFXB-03ChU9-8gf6mG-c46dF3
> 
>  <<UBL-Library.zip>> 

UBL-Library.zip



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC