-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unit has at least one <segment> or <ignorable> #31
Comments
Hi,
Could you be more specific, pls?
Provide an example of which xliff file you are trying to create? Code that raise the exception and exactly which part of the standard it is not implemented correctly?
Also, please verify with the xliff schematron validation that the xliff file you are creating is valid.
Thx
…Sent from my iPhone
On 19 May 2019, at 07:52, Maksym ***@***.***> wrote:
Hi.
I just started using this lib and found one strange exception that doesn't correspond with the documentation http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html.
Unit tag has "at least one of ( OR )"? As a result, I get an exception with the following type of xlif file:
...................................
Ignorable source
..........................................
I can fix this issue, and deliver code. Are you okay with this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi,
In this case, we get exception with the following error message: "The element must contain one or more Segment"
Same you can find in 4.2.2.5 unit paragraph - "One or more segment or ignorable elements in any order."
And the problem is in the same file with 4126 line:
|
I've tried your xliff file on another XLIFF 2.0 validator and it also fails.
https://okapi-lynx.appspot.com/validation
So maybe it's a bug also in there, or maybe there is either an error in the
validation schema of the specs, or in the text of the specs themselves.
Maybe @DavidFatDavidF can shad some light
…On Mon, May 20, 2019 at 1:29 PM Maksym ***@***.***> wrote:
Hi,
Thanks for the quick response
1. There is example with all xliff tree:
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en-US" trgLang="sv-SE">
<file id="SomeID">
<group id="_system">
<unit id="Unit1">
<ignorable>
<source>3213</source>
</ignorable>
</unit>
In this case, we get exception with the following error message: "The
element must contain one or more Segment"
1. In "4.2.1 Tree Structure" paragraph in
http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html
documentation, the Standard says that "Unit can have at least one of
(segment OR ignorable)"
Same you can find in 4.2.2.5 unit paragraph - "One or more segment or
ignorable elements in any order."
1. The following place throws the exception: "StandardValidator.cs
file, 4186 line"
And the problem is in the same file with 4126 line: hasSegment |=
container is Segment;
We can rename this variable to hadChildren and refactor code with the
following example:
hadChildren = unit.Resources.Count > 0
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#31?email_source=notifications&email_token=AAAPA5NEEP36UEVDQPQWEE3PWKDQ7A5CNFSM4HN3XIVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVYQVKQ#issuecomment-493947562>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAPA5NQHNVTPQXB47LDR73PWKDQ7ANCNFSM4HN3XIVA>
.
--
Simone Chiaretta
Microsoft MVP ASP.NET - ASPInsider
Blog: http://codeclimber.net.nz
RSS: http://feeds2.feedburner.com/codeclimber
twitter: @simonech
|
@MaximBrain just double checked.
http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html#unit So, validation from this library is correct. |
Hi @MaximBrain, @simonech This library, Okapi Lynx, and XLIFF Core Schematrons all correctly catch this as invalid.
|
Thx @DavidFatDavidF for the explanation too bad we cannot close the issue 😄 |
Hi, Strange, documentation has different explained behavior |
Thx
…Sent from my iPhone
On 20 May 2019, at 15:05, Maksym ***@***.***> wrote:
Hi,
Strange, documentation has different explained behavior
Anyway, thanks for the explanation
I'll close this issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi.
I just started using this lib and found one strange exception that doesn't correspond with the documentation http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html.
Unit tag has "at least one of ( OR )"? As a result, I get an exception with the following type of xlif file:
I can fix this issue, and deliver code. Are you okay with this?
The text was updated successfully, but these errors were encountered: