Framework failure for files named "build*.xml"?

Post here questions and problems related to oXygen frameworks/document types.
Posts: 17

Framework failure for files named "build*.xml"?

Wed Sep 27, 2017 12:03 am

My apologies if this is a known bug. It was just brought to my attention by one of my clients.

Environment: Oxygen Editor v18 and v19 standalone on Windows.

We are having trouble editing files with names of the form "[Bb]uild*.xml". When such files are opened, the correct framework is selected and loaded. But some framework operations then fail.

1) All such files are validated using the ANT validator when the validation file type is set to "Detected from input URL extension".

2) Setting the validation file type to "XML Document" allows the file to be validated correctly. But no combination of validation engine and schema setting enables Author mode. As far as we can tell, such files simply cannot be edited in Author mode.

Changing the file name so that it does not fit the above pattern fixes all problems.

I assume that this is due to some special processing logic for ANT files. But is there any way to turn it off? Oxygen clearly knows at some level that these are not ANT files because it selects the appropriate framework (in this case, based on root element). Is there a workaround, other than telling my clients to avoid certain file names?

Thanks in advance.
Posts: 481

Re: Framework failure for files named "build*.xml"?

Wed Sep 27, 2017 12:13 pm


I assume that this is due to some special processing logic for ANT files.

What happens is that Oxygen XML treats all files named similar to "build(+suffix).xml" as ANT build patterns, as you have figured-out yourself already, so this is why your "build.......xml" document is falsely considered to be ANT.

My advice is to change the pattern to your own ant build file naming scheme. The stricter the pattern, the better.
e.g. ant_build*.xml

To change the pattern, you should edit it in the "Ant build patterns" field from the oXygen 's menu Options > Preferences > File Types.

The reason this pattern is needed is that even though an ANT build file is an XML file at the core, it is not opened in the generic XML editor complemented with a document type, like most XML documents are (that's what you see when the pattern does not match your ANT build file). Instead, it is opened in a specialized editor that has an ANT specific Outline and ANT specific actions and features. The editor type detection is low level and only works at filename/extension level, hence the pattern. We will try to improve this detection in a future version and hopefully not need the pattern anymore.

In conclusion, you will have to adjust the ANT build pattern from File Types to a more restrictive one, to avoid confusion with other XML files named in a similar fashion.

Costin Sandoi
oXygen XML Editor and Author Support
Posts: 17

Re: Framework failure for files named "build*.xml"?

Wed Sep 27, 2017 4:48 pm

Thank you!

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 1 guest