Weird file association problem
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 11
- Joined: Sat Mar 12, 2005 12:37 am
Weird file association problem
Post by Martin Holmes »
Using Oxygen XML Editor 27.1, build 2025041508, a brand-new, very strange problem has occurred with file associations.
I have a single ant build file in my project, and a TEI file which is generated by the build. The TEI file is supposed to be validated against an RNG file generated from a TEI ODD file, and that association is specified in a Document Type Association setting which is the same as dozens I've done before in other projects. However, Oxygen thinks the TEI file is an Ant build file, and validates it against that schema. The file shows the Ant icon in the project view, and if I bring up its Properties popup, I see Content-type text/ant. I'm unable to change that as far as I can see.
Can anyone suggest why this might be happening in this one project and not in others? How do I change the content-type that Oxygen has decided to assign to this file?
I have a single ant build file in my project, and a TEI file which is generated by the build. The TEI file is supposed to be validated against an RNG file generated from a TEI ODD file, and that association is specified in a Document Type Association setting which is the same as dozens I've done before in other projects. However, Oxygen thinks the TEI file is an Ant build file, and validates it against that schema. The file shows the Ant icon in the project view, and if I bring up its Properties popup, I see Content-type text/ant. I'm unable to change that as far as I can see.
Can anyone suggest why this might be happening in this one project and not in others? How do I change the content-type that Oxygen has decided to assign to this file?
Martin Holmes
University of Victoria
University of Victoria
-
- Posts: 11
- Joined: Sat Mar 12, 2005 12:37 am
Re: Weird file association problem
Post by Martin Holmes »
I've answered my own question -- but it's definitely a bug in Oxygen.
The name of the file is "buildings.xml". Apparently Oxygen thinks any XML file that begins with "build" means it's an Ant file. Even creating a file association with the highest priority is not able to override this default.
But I would rather like to keep the proper filename for my file -- can anyone suggest a way to override this weird default? It doesn't seem to be defined in the Document Type Association for Ant; that just depends on a root `<project>` element, which of course my TEI file doesn't have.
The name of the file is "buildings.xml". Apparently Oxygen thinks any XML file that begins with "build" means it's an Ant file. Even creating a file association with the highest priority is not able to override this default.
But I would rather like to keep the proper filename for my file -- can anyone suggest a way to override this weird default? It doesn't seem to be defined in the Document Type Association for Ant; that just depends on a root `<project>` element, which of course my TEI file doesn't have.
Martin Holmes
University of Victoria
University of Victoria
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Weird file association problem
Hello Martin,
Indeed we have a crude way to detect if something is an ANT build file.
In the Oxygen Preferences->"File Types" there is an "ANT Build Patterns" field for which you can change the default value.
Regards,
Radu
Indeed we have a crude way to detect if something is an ANT build file.
In the Oxygen Preferences->"File Types" there is an "ANT Build Patterns" field for which you can change the default value.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 11
- Joined: Sat Mar 12, 2005 12:37 am
Re: Weird file association problem
Post by Martin Holmes »
Ah -- but since there is a Document Type Association which specifies a root project element, why is the file name pattern necessary? If I just delete it, won't the Document Type Association handle it anyway?
Martin Holmes
University of Victoria
University of Victoria
-
- Posts: 9473
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Weird file association problem
Hi Martin,
The framework configuration decides what schema, validation, transformation scenarios, Author CSSs should be used for an opened XML document. The ANT support is more extensive, it involves a special implemented Outline, special validation and content completion based on the Apache ANT libraries instead of just on the ANT DTDs. So this is why there is this extra mechanism to identify an ANT file, probably with a perfect internal architecture we would rely on the framework/document type name but that can also change if one extends the ANT framework.
What I did for now on my side was to change to a future release the "ANT Build Patterns" to something like "build-*.xml, build_*.xml,...." and in this way somehow avoid matching file names like "building".
Regards,
Radu
The framework configuration decides what schema, validation, transformation scenarios, Author CSSs should be used for an opened XML document. The ANT support is more extensive, it involves a special implemented Outline, special validation and content completion based on the Apache ANT libraries instead of just on the ANT DTDs. So this is why there is this extra mechanism to identify an ANT file, probably with a perfect internal architecture we would rely on the framework/document type name but that can also change if one extends the ANT framework.
What I did for now on my side was to change to a future release the "ANT Build Patterns" to something like "build-*.xml, build_*.xml,...." and in this way somehow avoid matching file names like "building".
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service