-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XLIFF 2.0 validator invalidate user defined subState/subType values #13
Comments
Hi, Valid prefixes must be registered with the XLIFF TC. See https://wiki.oasis-open.org/xliff/FragIDPrefixRegistration The list of accepted prefixes is currently available at https://tools.oasis-open.org/version-control/browse/wsvn/xliff/trunk/xliff2-fragid/registry.txt OpenXLIFF validation follows the rules for fragment IDs. Your suggestion makes sense, perhaps it could be another change for future versions of XLIFF. Regards, |
Hi Rodolfo, this is for validating custom value used for Are those prefixes the same as the ones used in custom values like in subState or subType?Technically no. However, it is strongly encouraged to A) be consistent and use the same prefix for both mechanisms in your custom data and B) to register the prefixes even if they are only for attribute values. In such case it is recommended for the registered URI to be a URL pointing to a public page where the attribute values are described. |
If registration of prefix is required for My interpretation of the spec is that users can define their own value of However, for data interchange purpose, it is recommended that such users who want to use Because a value of these attribute is out of XML namespace's scope, declaring XML namespace in I think XLFF validator should check if |
Hello Yoshito, In the first topic of the FAQ you can read this:
This means that if you don't register a prefix, the fragment identification feature is unusable. This is really silly. The validator is doing what the XLIFF TC says. What needs to be fixed is the requirement imposed by the XLIFF TC. Once that has changed, the validator will be updated accordingly. |
Opened an issue on XLIFF 2.2 repository to implement the change in future versions of XLIFF. |
The specification doesn't require subState values to be registered Invalidating subState attributes with unregistered prefixes is not conformant with the current specification. The specification doesn't need to change in order to fix the validation behavior. The confusion might come from the fact that the registration mechanism for the subState (or subType) prefixes is the same as for fragid. Registration of fragid prefixes for element based extensions is required, otherwise pointing to data in private elements in impossible.. |
According to XLIFF 2.0 specification, XLIFF user can define subState/subType values with custom namespaces.
For example, example XLIFF below defines a custom namespace
abc
andabc:mt
is used forsubState
attribute in<segment>
element.My understanding is that this is supported by XLIFF 2.0 specification. However, the validator returns an error -
Invalid prefix 'abc' in "subState" attribute
com.maxprograms.validation.Xliff20 has a list of known prefixes (namespaces) as below.
The list is fixed, so any other prefixes not included in this list will be invalidated. BTW, "my" in this list is not defined by XLIFF specification, but it is used in some examples in the specification.
The validator probably should append namespaces declared in
<xliff>
element toknownPrefixes
for validating subState/subType values.The text was updated successfully, but these errors were encountered: