24.08.2015 Views

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Editing Documents | 46• Use relative paths - enable this option if the <strong>XML</strong> instance document and the associated schema contain relativepaths. The location of the schema file is inserted in the <strong>XML</strong> instance document as a relative file path. This practiceallows you, for example, to share these documents with other users, without running into problems caused by differentproject locations on physical disk.The association with an <strong>XML</strong> Schema is added as an attribute of the root element. The Associate schema action addsa:• xsi:schemaLocation attribute, if the root element of the document sets a default namespace with an xmlnsattribute;• or a xsi:noNamespaceSchemaLocation attribute, if the root element does not set a default namespace.The association with a DTD is added as a DOCTYPE declaration. The association with a Relax NG , Schematron orNVDL schema is added as xml-model processing instruction.Associating a Schema With the Namespace of the Root ElementThe namespace of the root element of an <strong>XML</strong> document can be associated with an <strong>XML</strong> Schema using an <strong>XML</strong> catalog.If there is no xsi:schemaLocation attribute on the root element and the <strong>XML</strong> document is not matched with adocument type, the namespace of the root element is searched in the <strong>XML</strong> catalogs set in Preferences.If the <strong>XML</strong> catalog contains an uri or rewriteUri or delegateUri element, its schema will be used by theapplication to drive the content completion and document validation.The xml-model Processing InstructionThe xml-model processing instruction associates a schema with the <strong>XML</strong> document that contains the processinginstruction. It must be added at the beginning of the document, just after the <strong>XML</strong> prologue. The following code snippetcontains an xml-model processing instruction declaration:It is available in the content completion assistant, before <strong>XML</strong> document root element and has the following attributes:• href - schema file location. Mandatory attribute.• type - content type of schema. Optional attribute with the following possible values:• for DTD the recommended value is application/xml-dtd;• for W3C <strong>XML</strong> Schema the recommended value is application/xml or can be left unspecified;• for RELAX NG the recommended value is application/xml or can be left unspecified;• for RELAX NG - compact syntax the recommended value is application/relax-ng-compact-syntax;• for Schematron the recommended value is application/xml or can be left unspecified;• for NVDL the recommended value is application/xml or can be left unspecified.• schematypens - namespace of schema language of referenced schema with the following possible values:• for DTD - not specified;• for W3C <strong>XML</strong> Schema the recommended value is http://www.w3.org/2001/<strong>XML</strong>Schema;• for RELAX NG the recommended value is http://relaxng.org/ns/structure/1.0;• for RELAX NG - not specified;• for Schematron the recommended value is http://purl.oclc.org/dsdl/schematron;• for NVDL the recommended value is http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0.• phase - phase name of validation function in Schematron schema. Optional attribute.• title - title for associated schema. Optional attribute.Older versions of <strong>Oxygen</strong> <strong>XML</strong> used the oxygen processing instruction with the following attributes:• RNGSchema - specifies the path to the Relax NG schema associated with the current document;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!