[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Input Specification Developer's Release
For the impatient, go have a look at
http://wiki.brainattic.info/UBL_Input_Specifications
Now is the time for potential implementers or any others to take a look
and provide feedback.
Note that the final version will consist of separate HTML files, not a
Wiki page. For now the Wiki format gives added flexibility (and a
discussion page). The scripts are attached. Inline below is the separate
configuration file, to give an idea of its format.
#!/usr/bin/python
def configure_rules(rule):
"""Define the mapping from elements/attribues in UBL to a
'data collection intent' (DCI)
First parameter is a substring to match. Second parameter is the DCI.
The list of possible data collection intents is defined in the next
section
In the event of an overlap, last rule wins.
"""
rule("ID", "stringinput")
rule("Code", "stringinput")
rule("Indicator", "stringinput")
rule("Name", "stringinput")
rule("Reason", "stringinput")
rule("BuildingNumber", "stringinput") # not a bug -- really string
rule("Mail", "stringinput")
rule("Telephone", "stringinput")
rule("Telefax", "stringinput")
rule("Zone", "stringinput")
rule("Description", "stringinput")
rule("Line", "stringinput")
rule("Terms", "stringinput")
rule("Country", "stringinput")
rule("Note", "textarea")
rule("Date", "dateinput")
rule("DateTime", "datetimeinput")
rule("Quantity", "numberinput")
rule("Numeric", "numberinput")
rule("GUID", "hidden")
rule("Amount", "decimalinput")
rule("@", "hidden")
rule("/", "group")
def configure_data_collection_intents(intent):
"""A list of the data collection intents (first parameter), and a
human-readable description of each (second parameter)
"""
intent("hidden", "not presented to the end user")
intent("group", "recursive")
intent("stringinput", "plain string entry")
intent("numberinput", "whole number entry")
intent("decimalinput", "decimal number entry")
intent("dateinput", "date/calendar entry")
intent("datetimeinput","date and time entry")
intent("textarea", "multiline text entry")
intent("select1-AcknowledgementResponseCode", "code list
AcknowledgementResponseCode")
intent("select1-AllowanceChargeReasonCode", "code list
AllowanceChargeReasonCode")
intent("select1-ChannelCode", "code list ChannelCode")
intent("select1-ChipCode", "code list ChipCode")
intent("select1-CountryIdentificationCode", "code list
CountryIdentificationCode")
intent("select1-CurrencyCode", "code list CurrencyCode")
intent("select1-DocumentStatusCode", "code list
DocumentStatusCode")
intent("select1-LatitudeDirectionCode", "code list
LatitudeDirectionCode")
intent("select1-LineStatusCode", "code list
LineStatusCode")
intent("select1-LongitudeDirectionCode", "code list
LongitudeDirectionCode")
intent("select1-OperatorCode", "code list OperatorCode")
intent("select1-PaymentMeansCode", "code list
PaymentMeansCode")
intent("select1-SubstitutionStatusCode", "code list
SubsitutionStatusCode")
def configure_inline_groups(inline):
"""A simple list of group names to flatten out by one level.
(Mainly trivial things like a group-of-one)
"""
inline("cac:DeliveryTerms")
inline("cac:SalesConditons")
inline("cac:LegalTotal")
inline("cac:PaymentTerms")
inline("cac:AllowanceCharge")
inline("cac:OrderReference")
inline("cac:OrderedItemIdentification")
inline("cac:PartyName")
inline("cac:DocumentReference")
inline("cac:Contact")
inline("cac:SellersItemIdentification")
inline("cac:BasePrice")
inline("cac:TaxCategory")
inline("cac:TaxScheme")
-m
--
Available for consulting. XForms, web forms, information overload.
Micah Dubinko mailto:micah@dubinko.info
Brain Attic, L.L.C. http://brainattic.info
Yahoo IM: mdubinko +1 623 298 5172
Learn XForms today: http://xformsinstitute.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]