microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
730 stars 243 forks source link

XLIFF file causes error: Cannot find the declaration of element 'xliff'. #6468

Closed JanGrefe closed 3 years ago

JanGrefe commented 3 years ago

Describe the bug XLIFF file in my app is producing the error below:

cvc-elt.1.a: Cannot find the declaration of element 'xliff'.

\

When I replace http with https in the above line, it works, but since the xliff is regenerated with each build, I cannot fix the issue that way.

Screenshots Please refer to the attached screenshot xliff_error

kalberes commented 3 years ago

This is by design for now. We could change it though. We have not made a decision yet. According to the spec: https://www.w3.org/TR/2009/REC-xml-names-20091208/#ns-decl "It is not a goal that it be directly usable for retrieval of a schema (if any exists). " (The URL)

krajniks commented 3 years ago

This would be solved properly in xsi:schemaLocation. Currently it expect xsd of schema in local folder. If this would be exchanged with url of actual schema xsd found at http://docs.oasis-open.org/xliff/v1.2/cs02/xliff-core-1.2-transitional.xsd, there would be no error.

Would that change be feasible?

example before: image

example after image

recordplayer86 commented 2 years ago

I just had the same issue. The Red Hat "XML" Extension caused the issue.

krajniks commented 2 years ago

Every Xml schema validator should throw the same error, as it cannot find the valid schema. If you would copy schema to the Translations folder the error would also go away.

As this is open specification, it should always be available at the known url. why not use it. Is there any security concerns involved? Anything else to consider? @kalberes can this be reopened and reevaluated?

Liam-Olivier-Dynetek commented 8 months ago

You can solve that problem by adding an s to the end of "http" making it "https". Hope this helps.