Karen said:
> I believe that's what I was trying to do. Could you give a
> code example that we could use on the "patterns" page? Thanks.
I think Mikael is suggesting a Statement Template specifying a
combination of
(i) a Vocabulary Encoding Scheme Occurrence constraint (6.6.4.1) (to
say, "a VES URI is mandatory")
(ii) a Vocabulary Encoding Scheme list constraint (6.6.4.2), with one
member in the list (to say, "the (mandated) VES URI must come from this
list (of one member)"
(iii) a Value String Constraint (6.6.5) with:
(iv) a set of Literal List Constraints (6.5.1) (to say "the Value String
must come from this list of literals")
Using the DSP XML format, I think this would look like
<StatementTemplate type="nonliteral">
<Property>http://purl.org/dc/terms/subject/</Property>
<NonLiteralConstraint>
<VocabularyEncodingSchemeOccurrence>mandatory</VocabularyEncodingSchemeO
ccurrence> <-- (i) -->
<VocabularyEncodingSchemeURI>http://example.org/myColourScheme</Vocabula
ryEncodingSchemeURI> <-- (ii) -->
<ValueStringConstraint minOccurs="1" maxOccurs="1"> <-- (iii) -->
<LiteralOption lang="en">red</LiteralOption> <-- (iv) -->
<LiteralOption lang="en">white</LiteralOption> <-- (iv) -->
<LiteralOption lang="en">blue</LiteralOption> <-- (iv) -->
</ValueStringConstraint>
</NonLiteralConstraint>
</StatementTemplate>
You could also have a more complex case where you wanted Statements to
contain Value Strings in two languages e.g. (I added a Literal Language
Constraint (6.5.2) too)
<StatementTemplate type="nonliteral">
<Property>http://purl.org/dc/terms/subject/</Property>
<NonLiteralConstraint>
<VocabularyEncodingSchemeOccurrence>mandatory</VocabularyEncodingSchemeO
ccurrence> <-- (i) -->
<VocabularyEncodingSchemeURI>http://example.org/myColourScheme</Vocabula
ryEncodingSchemeURI> <-- (ii) -->
<ValueStringConstraint minOccurs="2" maxOccurs="2"> <-- (iii) -->
<LiteralOption lang="en">red</LiteralOption> <-- (iv) -->
<LiteralOption lang="fr">rouge</LiteralOption> <-- (iv) -->
<LiteralOption lang="en">white</LiteralOption> <-- (iv) -->
<LiteralOption lang="fr">blanc</LiteralOption> <-- (iv) -->
<LiteralOption lang="en">blue</LiteralOption> <-- (iv) -->
<LiteralOption lang="fr">bleu</LiteralOption> <-- (iv) -->
<LanguageOccurrence>mandatory</LanguageOccurrence>
</ValueStringConstraint>
</NonLiteralConstraint>
</StatementTemplate>
As Mikael said, what the Literal List Constraint gives you is just a
"flat" list of literals to choose from, with no relationships expressed
between the members of the list.
So, it doesn't specify that, say, "red" and "rouge" should be used as
Value Strings to represent the same value, or that "red" and "bleu"
should not be used as Value Strings to represent a single value.
Pete
---
Pete Johnston
Technical Researcher, Eduserv
[log in to unmask]
+44 (0)1225 474323
http://www.eduserv.org.uk/research/people/petejohnston/
http://efoundations.typepad.com/
|