<p> to <段落>)2007-08-08 to 2007年8月8日)<p> elements)Nothing! You can do everything with your favorite schema language
Three reasons follow:
<段落> to <p>2007年8月8日 to 2007-08-08Comparability of localized schemas
Look into existing approaches to localization tasks. Then,
Look into
translate attribute)First, what is a locale?
CLDR provides one, is based upon BCP 47 language identifiers
de_DE@collation=phonebook,currency=DDM
<loc:localInfo locale="de_DE" targetDeclaration="xs:element[@name='purchaseOrder']" ... > <loc:altIdent>Kaufbestellung</loc:altIdent> </loc:localInfo>
<xs:element name="purchaseOrder">
<xs:annotation>
<xs:appinfo>
<loc:localInfo locale="de_DE">
<loc:altIdent>Kaufbestellung</loc:altIdent>
</loc:localInfo>
</xs:appinfo>
</xs:annotation> ... </xs:element>
... and might also translate documentation
<xs:element name="purchaseOrder"> <xs:annotation> <loc:localInfo locale="de_DE"> <loc:altDocumentation> Schema zu Kaufbestellungen</loc:altDocumentation> ... </xs:element>
Target date data type
<loc:localInfo locale="de"> <loc:dateInfo calendarType="Gregorian" dateFormatLengthType="long"/> </loc:localInfo>
Using specific calendar types and date format types from CLDR
<dateFormatLength type="long"> <dateFormat> <pattern>d. MMMM yyyy</pattern> </dateFormat> </dateFormatLength>
d. MMMM yyyy says:
E.g., 8. August 2007
Input from CLDR mainly "d. MMMM yyyy"
Generating data type patterns for XML Schema data types
<xs:pattern
value="\d{1,2}\.\s+(Januar|Februar|März|April|Mai|Juni|Juli|August
|September|Oktober|November|Dezember)\s+\d{4}"/>
then, replace xs:date with the pattern
Input
d. MMMM yyyy"8. August 2007Output 2007-08-08
Locale display names for English en from CLDR
<localeDisplayNames> <languages> <language type="de">German</language> [...] </languages> <scripts> <script type="Latn">Latin</script> [...] </scripts> <territories> <territory type="DE">Germany</territory> [...] </territories> [...]</localeDisplayNames>
Locale display names for German de from CLDR
<localeDisplayNames> <languages> <language type="de">Deutsch</language> [...] </languages> <scripts> <script type="Latn">Lateinisch</script> [...] </scripts> <territories> <territory type="DE">Deutschland</territory> [...] </territories> [...]</localeDisplayNames>
Generation of code lists
<xs:element name="language"> <xs:annotation> <xs:appinfo> <loc:localInfo locale="de"> <loc:localeDisplayNames type="languages"/> </loc:localInfo> </xs:appinfo> </xs:annotation> ... </xs:element>
... it's being implemented with
Questions?
