Hi Rodolfo,
> 2) If <target> is present in <segment>, the value of "state" cannot be "initial.
This is the point I don't like. The spec defines "initial" as the default value of "state". If there are no default value, I can understand the processing requirement above.
When we parse XLIFF to runtime representation in tooling code, <segment> and <segment state="initial"> should be equivalent.
The processing requirement above says:
<segment state="initial">
<source>Foo</source>
<target>Bar</target>
</segment>
Is illegal. But
<segment>
<source>Foo</source>
<target>Bar</target>
</segment>
Is above illegal?
If we need to handle above two expressions differently, then parser needs to manage two different states "state is set and the value is initial" and "state is not set". If default value is not defined for state attribute, then it makes
sense.
-Yoshito
From: <
xliff@lists.oasis-open.org> on behalf of "Rodolfo M. Raya" <
rmraya@maxprograms.com>
Date: Wednesday, April 6, 2022 at 8:06 PM
To: "xliff@lists.oasis-open.org" <
xliff@lists.oasis-open.org>
Subject: [EXTERNAL] RE: [xliff] Another spec question - processing requirements for state attribute
Hello Yoshito, What the spec tries to say is something like this: 1) If a <segment> does not have <target>, the only possible value for "state" is "initial" 2) If <target>
is present in <segment>, the value of "state" ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Hello Yoshito,
What the spec tries to say is something like this:
1) If a <segment> does not have <target>, the only possible value for "state" is "initial"
2) If <target> is present in <segment>, the value of "state" cannot be "initial.
I really don't like how the _expression_ "if and only if" is used in the specification. It is not as clear as what you can express with two conditions like the ones
above.
I don't think "state" can be explicitly set to "initial" when there is a <target> because the target must contain a translation for the sibling <source>, which
means it can't be empty and therefore it can't be in "initial" state.
And you are probably right about the errors in the examples. We need to validate them all.
Regards,
Rodolfo
--
Rodolfo M. Raya
Maxprograms
http://www.maxprograms.com