05-07-2008 10:00 PM
05-10-2008 01:36 AM
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:pr="http://www.alfresco.org/alfresco/press-release"
targetNamespace="http://www.alfresco.org/alfresco/press-release"
elementFormDefault="qualified">
<xs:simpleType name="LocaleType">
<xs:restriction base="xs:string">
… other locales go here …
<xs:enumeration value="en_AU" />
<xs:enumeration value="en_US" />
… other locales go here …
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PressReleaseType">
<xs:sequence>
<xs:element name="Title" type="xs:normalizedString" minOccurs="1" maxOccurs="1" />
<xs:element name="Summary" type="xs:normalizedString" minOccurs="0" maxOccurs="1" />
<xs:element name="Keyword" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="PublishDate" type="xs:date" minOccurs="0" maxOccurs="1" />
<xs:element name="ExpiryDate" type="xs:date" minOccurs="0" maxOccurs="1" />
<xs:element name="Locale" type="pr:LocaleType" minOccurs="1" maxOccurs="1" />
<xs:element name="ParentTranslation" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
<xs:element name="Body" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Image" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:element name="PressRelease" type="pr:PressReleaseType" />
</xs:schema>
Say you have a single logical press release with two translations (an original English (US) asset and a derived English (Australian) asset), the XML might look like:
<!– Original English (US) asset –>
<PressRelease>
… other elements …
<Locale>en_US</Locale>
<!– Note: no ParentTranslation element since this is the "master" translation –>
… other elements …
</PressRelease>
<!– Derived English (Australian) asset –>
<PressRelease>
… other elements …
<Locale>en_AU</Locale>
<ParentTranslation>/path/to/original/english/us/file.xml</ParentTranslation>
… other elements …
</PressRelease>
This structure basically defines a mini-hierarchy per logical asset, where the nodes in that hierarchy are separate XML files that each represent an individual translation. The primary advantage of this approach is that the tree can grow over time as translations trickle in - you're not forced to wait for the translations to arrive before publishing the original (or those translations that are created quickly).Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.