Liquid Studio Documentation
XML Editor / Associating a schema with an XML Document
In This Topic
    Associating a schema with an XML Document
    In This Topic

    Validation and Intellisense

    For Validation and intellisense to operate correctly XML Studio needs to know the XML Schema that describes your XML Document.

    The rules for finding the schema are as follows.

    1. Check Schema Location Attributes

    If the XML Document contains a schema location attributes (xsi:noNamespaceSchemaLocation or xsi:schemaLocation attributes), then the schemas pointed to are loaded and used for validation and intellisense.

    2. Namespace

    The namespaces declared in the XML file are used to lookup schemas from the Schema Library. If a namespace in your XML file matches an entry in the schema library then all the schemas for that entry are loaded. You can also add your own entries to the Schema Library.

    3. Manually associating schemas

    You can manually associate schemas with your XML File. The schemas must been within the Schema Library, these settings are then remembered then next time the XML file is opened. This is particularly useful if your XML file does not contain a target namespace, as automatic matching is therefore not possible.

    It is also possible to explicitly exclude schemas from being used. This is useful when dealing with multiple versions of a schema or if intellisense becomes to slow (which can happen when using very large complex schemas).


    Manually associating a schema with an XML File

    You can control the schemas that are associated with your XML File using the "Xml Document to Schema Mappings" form.

    Liquid XML Studio - associating an XML Schema with an XML File

    The form show all the schemas that have been added to the Schema Library. At the top of the list are the schemas that have been found in your XML document (i.e. via xsi:noNamespaceSchemaLocation or xsi:schemaLocation attributes). You can add your own entries to the schema library using the Add Button.

    Automatic schema selection Automatic schema selection. If the namespace in the schema entry match the ones in your XML file then this entry will be used.
    This is the default state for all entries.
    Explicitly included schema     Explicitly use schema. The schema is used regardless of whether the namespaces appear in the XML document. This can be useful when associating schemas  XML documents that do not contain any namespace information.
    Explicitly exluded schema Don't use Schema. The schema will not be used regardless of whether its namespaces match the XML Document. This is useful when you have several versions of the same schema, and they all have the same namespace, or where the schema is so large intellisense slows down the XML Editor to an unacceptable degree.


    Adds a new entry to the Schema Library (global setting)


    Removes an entry  Schema Library (global setting)


    Discards all changes you have made to the schema library and resets it to the installation default state (global setting).


    Adding a new Schema Entry

    New schemas and schema sets can be added to the schema library using the Add button.

    Add Schema Library Entry

    The new entry must have a unique name and contain at least one schema. The namespace's shown in the list are used to map the XML schema to an XML document. If your schema includes other schemas, then they will automatically be included.

    The other entries are for your own use and are optional

    Only add in entries for the root schemas. As the matching is done based on namespace, if you explicitly add in common schemas (xlink etc) then this entry will be matched for any XML File containing an xlink namespace, this will slow things down and lead to validation errors.