In anticipation of closing down on 2.0, we have two new proposals for modules. In this mail, we are proposing the first of the two, a Validation module.
Validating localized target data is a very important part of the business of outsourcing localization, especially when the extracted source content comes from software. Typically,
there is a plethora of tools that content providers and localization suppliers use to perform a multitude of validations. There is a strong desire in the industry to bring some consistency to this space, but there are currently no accepted standards or interchange
formats that facilitate this activity. We would like to propose a Validation module that would help with standardizing this crucial activity.
The basic idea would be to define a small set of standard validation rules and standard descriptions for them that tool developers could consistently build business logic around.
How a rule is applied to a string or sub-string would be done using regular expressions. These would all be contained in a Validations module.
Here’s a draft of the Module for comment:
The target text of a document can be verified against various validation rules. The Validations Module should be able to store a list of pre-defined validation rules, along with a description about how to process the target text using those rules, to perform
The namespace for the Verification module is: urn:oasis:names:tc:xliff:validations:2.0
The elements defined in the Validations module are: <validations>, <validation>, and <matchExpression>.
1 = one + = one or more ? = zero or one
Collection of validations to be applied by a validation engine
- One or more <validation> elements
<file>, <group>, <unit> and <segment>
Specifies a validation rule, and a description and regular _expression_, which define how to apply that validation rule to the target text.
- One <matchExpression> element
A regular _expression_ used to match the target text or substring to which the validation rule is applied.
The attributes defined in the Validations module are: name, id, rule, and desc.
Name – The user-defined name of a named validations element.
Value description: NMTOKEN.
Identifier - A character string used to identify a <validation> element.
Value description: NMTOKEN.
The value must be unique within the <validations> element.
Validation Rule - Indicates the rule that a validation engine should apply to the target text.
Value description: A paired value with desc. See table below.
Validation description – indicates how a specific rule should be applied to the target text.
Value description: A paired value with rule. See table below.
Possible values for rule and desc attributes (format and number of rules TBD):
Match string can’t be longer than # of chars specified.
Match string can’t be shorter than # of chars specified.
Match string shouldn’t be localized
Using the following segment as an example
Match succeeds, so validation business logic checks to see if the string is less than 100 chars, that also succeeds, and the business logic then takes the appropriate action.
<validation rule=”maxLength:100” desc=”Match string can’t be longer than # of chars specified.”>
\bsomeCompany\b doesn’t match “someCompany” in the target text.
Validation business logic takes the appropriate action for the match failure.
<validation rule=”noLoc” desc=”Match string shouldn’t be localized.”>
Rules not defined in the Module can still be defined using the same mechanisms, though user agents that support the Validation Module may or may not have built-in implementation
for them. An example might be to check if the target text contains a valid email address.
Validation business logic takes appropriate action for the match success.
<validation rule=”validEmail” desc=”Match string is a valid email address.”>
Please let us know your opinion on this proposal.
(Ryan King, Kevin O'Donnell, Uwe Stahlschmidt, Alan Michael)