oxygenxml / xliff

oXygen XML Editor framework for XLIFF
Apache License 2.0
4 stars 2 forks source link

informativeCopiesOf3rdPartySchemas validation warning... #4

Closed jhargraveiii closed 2 years ago

jhargraveiii commented 2 years ago

I get this error when validating xliff 2 or 2.1: Imported schema document ../informativeCopiesOf3rdPartySchemas/w3c/xml.xsd cannot be located: java.io.FileNotFoundException (/home/jimh/Oxygen XML Developer 24/frameworks/xliff/schemas/2.0/informativeCopiesOf3rdPartySchemas/w3c/xml.xsd (No such file or directory))

I copied the xml.xsd file and created the required directories (informativeCopiesOf3rdPartySchemas/w3c/xml.xsd) but still get the warning.

raducoravu commented 2 years ago

What version of Oxygen are you using? Oxygen should already have the xliff framework bundled inside it, did you install this extra GitHub framework in Oxygen? For example do you get this problem when validating this very simple xliff 2.0 file:

    <xliff version='2.0'
        xmlns='urn:oasis:names:tc:xliff:document:2.0' srcLang="en" trgLang="fr">
        <file id="f1">
            <unit id="u1">
                <segment>
                    <source></source>
                </segment>
            </unit>
        </file>
    </xliff>

?

raducoravu commented 2 years ago

So you should try to uninstall this external framework and use Oxygen's built-in support for Xliff first. I also just updated this framework with the latest contents of the Oxygen xliff framework, including a small changes to the XML catalog file which referenced this extra xml.xsd.

jhargraveiii commented 2 years ago

I have the latest version 24.1

informativeCopiesOf3rdPartySchemas is an optional third party w3c xsd:

http://docs.oasis-open.org/xliff/xliff-core/v2.1/csprd01/schemas/informativeCopiesOf3rdPartySchemas/w3c/

http://docs.oasis-open.org/xliff/xliff-core/v2.1/csprd01/schemas/informativeCopiesOf3rdPartySchemas/readme.txt

It is included in:

resources_data.xsd and that's where the file not found error happens.

Jim

On 3/30/22 07:34, Radu Coravu wrote:

What version of Oxygen are you using? Oxygen should already have the xliff framework bundled inside it, did you install this extra GitHub framework in Oxygen? For example do you get this problem when validating this very simple xliff 2.0 file:

|<xliff version='2.0' xmlns='urn:oasis:names:tc:xliff:document:2.0' srcLang="en" trgLang="fr"> |

?

— Reply to this email directly, view it on GitHub https://github.com/oxygenxml/xliff/issues/4#issuecomment-1083148536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMUDYAPIK7M2GOKKG5GKO3VCRJ7XANCNFSM5SB6AAJA. You are receiving this because you authored the thread.Message ID: @.***>

jhargraveiii commented 2 years ago

Yes I am using the built-in support - just wanted to point out the warning as it is confusing unless you understand the background.

On 3/30/22 07:39, Radu Coravu wrote:

So you should try to uninstall this external framework and use Oxygen's built-in support for Xliff first. I also just updated this framework with the latest contents of the Oxygen xliff framework, including a small changes to the XML catalog file which referenced this extra xml.xsd.

— Reply to this email directly, view it on GitHub https://github.com/oxygenxml/xliff/issues/4#issuecomment-1083153502, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMUDYFRSV5PXRVTIVYNHXLVCRKQZANCNFSM5SB6AAJA. You are receiving this because you authored the thread.Message ID: @.***>

jhargraveiii commented 2 years ago

Yes any xliff 2, 2.1 will trigger the warning as the schema is trying to load a file that is not present. However, manually adding the xsd.xml  file doesn't seem to fix the problem.

On 3/30/22 07:34, Radu Coravu wrote:

|<xliff version='2.0' xmlns='urn:oasis:names:tc:xliff:document:2.0' srcLang="en" trgLang="fr"> |

raducoravu commented 2 years ago

Using the sample XLiff 2.0 I pasted above I cannot reproduce the problem, I get no validation error in Oxygen. I'm testing with Oxygen 24.1 with default settings.

jhargraveiii commented 2 years ago

Maybe the validation engine matters I'm using the default config for Saxon EE. Validating with LibXML doesn't produce any warning. Strange.

On 3/30/22 07:47, Radu Coravu wrote:

Using the sample XLiff 2.0 I pasted above I cannot reproduce the problem, I get no validation error in Oxygen. I'm testing with Oxygen 24.1 with default settings.

— Reply to this email directly, view it on GitHub https://github.com/oxygenxml/xliff/issues/4#issuecomment-1083162551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMUDYCFP435JUAQVZVMT2DVCRLPPANCNFSM5SB6AAJA. You are receiving this because you authored the thread.Message ID: @.***>

raducoravu commented 2 years ago

@jhargraveiii right, now I can also reproduce the problem using Saxon EE for validation, it probably depends on how various validators try to find the xml.xsd, probably the "resource_data.xsd" should just have referenced the namespace:

<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>

as the xml.xsd is usually known by default to validators. Why are you validating with Saxon EE in particular? Oxygen's default validation is done using the Xerces parser which does not show any validation error.

jhargraveiii commented 2 years ago

Saxon EE normally has the most up to date code and matches what I am doing in Java (we use saxon ee). But it's good to know its just a validator issue! thank you!

Jim

On 3/30/22 07:56, Radu Coravu wrote:

@jhargraveiii https://github.com/jhargraveiii right, now I can also reproduce the problem using Saxon EE for validation, it probably depends on how various validators try to find the xml.xsd, probably the "resource_data.xsd" should just have referenced the namespace:

| |

as the xml.xsd is usually known by default to validators. Why are you validating with Saxon EE in particular? Oxygen's default validation is done using the Xerces parser which does not show any validation error.

— Reply to this email directly, view it on GitHub https://github.com/oxygenxml/xliff/issues/4#issuecomment-1083172879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMUDYHFAHRXOQRO6ERMZR3VCRMRHANCNFSM5SB6AAJA. You are receiving this because you were mentioned.Message ID: @.***>

jhargraveiii commented 2 years ago

and I confirmed your suggested changes to resource_data.xsd work! No warning now. thank you!

On 3/30/22 07:56, Radu Coravu wrote:

@jhargraveiii https://github.com/jhargraveiii right, now I can also reproduce the problem using Saxon EE for validation, it probably depends on how various validators try to find the xml.xsd, probably the "resource_data.xsd" should just have referenced the namespace:

| |

as the xml.xsd is usually known by default to validators. Why are you validating with Saxon EE in particular? Oxygen's default validation is done using the Xerces parser which does not show any validation error.

— Reply to this email directly, view it on GitHub https://github.com/oxygenxml/xliff/issues/4#issuecomment-1083172879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMUDYHFAHRXOQRO6ERMZR3VCRMRHANCNFSM5SB6AAJA. You are receiving this because you were mentioned.Message ID: @.***>