set an XML Schema for a directory?

Hi, I haven't used project mode much, but I just created a new project and imported a directory structure into it. One of the folders contains content files that are supposed to adhere to one XML Schema. I see the 'validate selection with...' which allows me to validate the entire directory -- which is great. However, when I bring up an invalid file I would like to have the editor know which schema to use (the one I validated the dir against) so the editor will give the element/attribute options without having to assign the schema each time. Make sense? Is this possible? best, -Rob

Hello Robert, The schema is not assigned to a file when the action "Validate Selection with ..." is executed in the Project view. You still need to use one of the schema association mechanisms of Oxygen because the Project view action is intended as a one time only association between a set of files and a schema. I am sure you already know the association mechanisms of Oxygen but just in case there are some users who do not know them: - the schema of a document type that matches the edited document: http://www.oxygenxml.com/doc/ug-oxygen/author-predefined-doc-types.html http://www.oxygenxml.com/doc/ug-oxygen/preferences-document-type-association... - a schema specified in the edited document, for example with a DOCTYPE declaration, the xsi:schemaLocation attribute or a processing instruction (for Relax NG schemas and NVDL schemas): http://www.oxygenxml.com/doc/ug-oxygen/editing-xml-documents.html#setting-sc... - the schema learned by Oxygen from the current structure of the XML document: http://www.oxygenxml.com/doc/ug-oxygen/editing-xml-documents.html#learning-d... Regards, Sorin Robert Koberg wrote:
Hi,
I haven't used project mode much, but I just created a new project and imported a directory structure into it. One of the folders contains content files that are supposed to adhere to one XML Schema. I see the 'validate selection with...' which allows me to validate the entire directory -- which is great.
However, when I bring up an invalid file I would like to have the editor know which schema to use (the one I validated the dir against) so the editor will give the element/attribute options without having to assign the schema each time.
Make sense? Is this possible?
best, -Rob

Hello Robert, We implemented the fix for this problem: starting with version 10.2 the File Name field of an association rule created in a document type (menu Options -> Preferences -> Document Type Association) will accept the wildcards * and ? and editor variables like ${pd} - project directory. This will allow you to match all the files of a folder with only one association rule instead of one association rule for each file. Regards, Sorin Robert Koberg wrote:
Hi,
I haven't used project mode much, but I just created a new project and imported a directory structure into it. One of the folders contains content files that are supposed to adhere to one XML Schema. I see the 'validate selection with...' which allows me to validate the entire directory -- which is great.
However, when I bring up an invalid file I would like to have the editor know which schema to use (the one I validated the dir against) so the editor will give the element/attribute options without having to assign the schema each time.
Make sense? Is this possible?
best, -Rob
participants (2)
-
Robert Koberg
-
Sorin Ristache