Schema link in doc type association failing on Windows

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
martindholmes
Posts: 156
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Schema link in doc type association failing on Windows

Post by martindholmes » Mon Jun 29, 2020 9:33 pm

Hi there,

We have a document type association setup where we have a Schema link specified like this:

Code: Select all

${pdu}/data/sch/lemdo.rng
This works fine on Linux and Mac, but on some Windows machines we get this error:

"Validation unit was not applied because schema location is not a valid URL: C:\Users\xyz\lemdo/data/sch/lemdo.rng."

Code: Select all

${pdu}
should be the project directory as a URL, so I don't see why it would be converted into a local system path with backslashes. What are we doing wrong here?

All help appreciated,
Martin Holmes

adrian
Posts: 2679
Joined: Tue May 17, 2005 4:01 pm

Re: Schema link in doc type association failing on Windows

Post by adrian » Tue Jun 30, 2020 8:59 am

Hi,

What version/build of Oxygen are you using (Help > About) on the Windows machines in question?
${pdu} is expanded to a URL of the project directory, so there may be something else that changes it into a path.
Check your validation scenario, if you have a custom one.

Are you using XML catalogs that may tamper with (rewrite) the project folder location?
Check for global or project catalogs in Options > Preferences, XML / XML Catalog. Also check your document type, Catalogs tab.
If you want to debug XML catalogs, set Verbosity to "All messages" in the preferences and run the validation. You'll see a lot of messages in the Catalogs panel from the Results. Look for the messages after the "Loading catalog". Check if there are any URI messages relating to "lemdo.rng".
If the number of messages gets overwhelming, clear the Catalogs list (Remove all) and run the validation again.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

martindholmes
Posts: 156
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Schema link in doc type association failing on Windows

Post by martindholmes » Tue Jun 30, 2020 6:17 pm

It's build 2020061102. We have nothing weird like catalog at all.

In Options / XML / XML Catalog, everything is (I assume) at the default settings; we've never needed to change anything there before. But the default settings include these items being checked:

Code: Select all

Resolve schema locations through system mappings

Code: Select all

Use default catalog
With the default catalog being frameworks/catalog.

Could one of these settings be causing the problem?

There are indeed lots of debug messages when I turn on verbosity -- I can ask the user in question to do the same thing, if none of the above settings is at fault.

adrian
Posts: 2679
Joined: Tue May 17, 2005 4:01 pm

Re: Schema link in doc type association failing on Windows

Post by adrian » Tue Jun 30, 2020 6:28 pm

Hi,

Those are the default XML catalog options. By themselves they cannot cause what is happening. You need an explicit XML catalog rule that tampers with URIs or systemIDs.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

martindholmes
Posts: 156
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Schema link in doc type association failing on Windows

Post by martindholmes » Thu Jul 02, 2020 1:34 am

There is no such rule. I've never used XML catalogs in any of my projects, and I don't imagine I ever would. Something else must be happening here. Do you have any other suggestions?

adrian
Posts: 2679
Joined: Tue May 17, 2005 4:01 pm

Re: Schema link in doc type association failing on Windows

Post by adrian » Thu Jul 02, 2020 6:24 pm

Hi,

If possible, please send the .framework file of your document type association (from the user who is experiencing the problem), so we can investigate. Send it to support@oxygenxml.com or use the https://www.oxygenxml.com/techSupport.html page to submit the file.

For the Windows user that reproduces the problem, please also ask them to use menu > Help > Report problem and Submit a report. I'm particularly interested in the Plugins and Frameworks they have. Details from the report may also show other potential causes.


Do note that XML catalogs from any frameworks (document types) may interfere, if your users have other custom frameworks.
I'm not sure if XML catalogs are the cause of this problem or not, but they are a potential cause. I can implement an XML catalog that purposely causes exactly what's happening to your Windows user, so I feel this needs to be investigated before we can rule it out.

After a validation, please save the catalog messages from the user with the problem to a file (right click in Catalogs tab and "Save Results as XML"), zip the XML file (if large) and send them to us (email or support page).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

martindholmes
Posts: 156
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Schema link in doc type association failing on Windows

Post by martindholmes » Thu Jul 02, 2020 8:21 pm

Thanks Adrian. I'm going to try turning off all other document type associations in the project settings. Note that we don't have a framework; we just use the project XPR file to configure this stuff. There were quite a few other document type associations checked, presumably by default. If that doesn't solve the problem, I'll get the user to go through the steps you suggest, and I'll submit the XPR file and other relevant stuff.

adrian
Posts: 2679
Joined: Tue May 17, 2005 4:01 pm

Re: Schema link in doc type association failing on Windows

Post by adrian » Fri Jul 03, 2020 9:47 am

Hi,

If the document type association is stored in Project Options, please send the project (.xpr) file. It would be preferable to use the copy of the project file from the user that experiences the problem, just in case there are other changes that could affect this.
One thing I forgot, for the same user please also export and send the global options (Options > Export Global Options).

Default (out-of-the-box) document type associations are unlikely to cause this. They are continuously being tested and their XML catalogs have limited scopes.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

adrian
Posts: 2679
Joined: Tue May 17, 2005 4:01 pm

Re: Schema link in doc type association failing on Windows

Post by adrian » Thu Jul 09, 2020 6:25 pm

Hi,

In case anyone else encounters a similar situation, the problem turned out to be a custom validation scenario which had a validation unit that used for the Schema URI:

Code: Select all

${pd}/data/sch/lemdo.rng

The document type association only takes precedence over the schema association from the file. This applies for the default Oxygen validation (without a custom validation scenario).

A custom validation scenario can override the schema from the document type (or from the file). A scenario is meant to allow you to perform complex validations with multiple schemas (can be different than the one in document type), or validations in context (validate the root/master where the file is used, not the file by itself). So, both the file being validated and the schema used to validate the file can be different in the validation scenario.

For debugging validation issues, the Information view (Window > Show View > Information) will tell you what file is being validated and with what schema.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Post Reply