| <?xml version='1.0' encoding='UTF-8'?> | |
| <!-- Schema file written by PDE --> | |
| <schema targetNamespace="org.eclipse.compare.examples.xml" xmlns="http://www.w3.org/2001/XMLSchema"> | |
| <annotation> | |
| <appinfo> | |
| <meta.schema plugin="org.eclipse.compare.examples.xml" id="idMapping" name="XML Id Mapping"/> | |
| </appinfo> | |
| <documentation> | |
| This extension point allows to define internal XML ID Mapping schemes using the <i>mapping</i> element. | |
| These schemes can then be used when performing an XML compare to uniquely identify XML elements by the | |
| value of an attribute or the text in a child element. | |
| Additionally, <i>ordered</i> elements can be used to specify that the direct children of an element | |
| should be compared in an ordered fashion instead of the default unordered way. | |
| </documentation> | |
| </annotation> | |
| <element name="extension"> | |
| <annotation> | |
| <appinfo> | |
| <meta.element /> | |
| </appinfo> | |
| </annotation> | |
| <complexType> | |
| <sequence> | |
| <element ref="idMap" minOccurs="0" maxOccurs="unbounded"/> | |
| </sequence> | |
| <attribute name="point" type="string" use="required"> | |
| <annotation> | |
| <documentation> | |
| a fully qualified identifier of the target extension point | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| <attribute name="id" type="string"> | |
| <annotation> | |
| <documentation> | |
| an optional identifier of the extension instance | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| <attribute name="name" type="string"> | |
| <annotation> | |
| <documentation> | |
| an optional name of the extension instance. | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| </complexType> | |
| </element> | |
| <element name="idMap"> | |
| <complexType> | |
| <sequence> | |
| <element ref="mapping"/> | |
| <element ref="ordered"/> | |
| </sequence> | |
| <attribute name="name" type="string" use="required"> | |
| <annotation> | |
| <documentation> | |
| the name of the ID Mapping scheme. Should be unique. | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| <attribute name="extension" type="string"> | |
| <annotation> | |
| <documentation> | |
| a file extension associated with this ID Mapping Scheme. | |
| When comparing files with this extension, the current ID Mapping | |
| Scheme will automatically be used. | |
| If an extension is specified, then the extension should also be added | |
| in the plugin.xml file of the XML Compare Plugin. For example, if we | |
| create an ID Mapping Scheme with extension cd, the plugin.xml of the | |
| XML Compare Plugin is updated as follows (update shown in bold): | |
| <p> | |
| <pre> | |
| <extension | |
| point="org.eclipse.compare.structureMergeViewers"> | |
| <structureMergeViewer | |
| extensions="xml,classpath,cd" | |
| class="org.eclipse.compare.xml.XMLStructureViewerCreator" | |
| /> | |
| </extension> | |
| </pre> | |
| </p> | |
| <p> | |
| Warning: If an extension is associated more than once, only the first | |
| association will be considered. Also, internal ID Mapping schemes have | |
| priority over user ID Mapping schemes when duplicate extensions are defined. | |
| </p> | |
| <p> | |
| Warning: When an internal ID Mapping scheme with extension association is | |
| removed (from a plugin.xml ), the XML Compare plugin has to be reloaded | |
| to disassociate itself from the extension. If not, on the first compare | |
| of files with this extension, the XML Compare plugin will be used with | |
| the default Unordered algorithm. (However, at this point the extension | |
| will have been disassociated from the XML Plugin, as the plugin has been loaded.) | |
| </p> | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| </complexType> | |
| </element> | |
| <element name="mapping"> | |
| <complexType> | |
| <attribute name="signature" type="string" use="required"> | |
| <annotation> | |
| <documentation> | |
| the XML path from the root to the current element (see examples below). | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| <attribute name="id" type="string" use="required"> | |
| <annotation> | |
| <documentation> | |
| the attribute that identifies this element or the name of the child element whose text identifies this element. | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| <attribute name="id-source" type="string"> | |
| <annotation> | |
| <documentation> | |
| if id is the name of a child element, then this attribute must have the value body. | |
| If id-source is left out, it is assumed that id is an attribute. | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| </complexType> | |
| </element> | |
| <element name="ordered"> | |
| <complexType> | |
| <attribute name="signature" type="string" use="required"> | |
| <annotation> | |
| <documentation> | |
| the XML path from the root to the element whose direct children will be | |
| compared in ordered fashion instead of the default unordered way. | |
| </documentation> | |
| </annotation> | |
| </attribute> | |
| </complexType> | |
| </element> | |
| <annotation> | |
| <appinfo> | |
| <meta.section type="since"/> | |
| </appinfo> | |
| <documentation> | |
| 3.0.0 | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appinfo> | |
| <meta.section type="examples"/> | |
| </appinfo> | |
| <documentation> | |
| The following is an example ID Mappings Scheme for ANT files. | |
| <i>project</i> elements are identified by an <i>attribute name</i>. <i>target</i> elements (which are children of <i>project</i>) are also identified by an attribute <i>name</i>. Also, the children of <i>target</i> will be compared in the order in which they appear in the document. | |
| <p> | |
| <pre> | |
| <extension point = "org.eclipse.compare.examples.xml.idMapping"> | |
| <idmap name="ANT"> | |
| <mapping signature="project" id="name"/> | |
| <mapping signature="project>target" id="name"/> | |
| <ordered signature="project>target"/> | |
| <idmap> | |
| </extension> | |
| </pre> | |
| </p> | |
| The following example illustrates a case where the text of a child element is used as the id: | |
| <p> | |
| <pre> | |
| <extension point = "org.eclipse.compare.examples.xml.idMapping"> | |
| <idmap name="Book Catalog" extension="book"> | |
| <mapping signature="catalog>book" id="isbn" id-source="body"/> | |
| <idmap> | |
| </extension> | |
| </pre> | |
| </p> | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appinfo> | |
| <meta.section type="apiInfo"/> | |
| </appinfo> | |
| <documentation> | |
| [Enter API information here.] | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appinfo> | |
| <meta.section type="implementation"/> | |
| </appinfo> | |
| <documentation> | |
| The XML Compare plugin defines an ID Mapping scheme for Eclipse <samp>plugin.xml</samp> files, one for <samp>.classpath</samp> files and one for Ant files. | |
| </documentation> | |
| </annotation> | |
| <annotation> | |
| <appinfo> | |
| <meta.section type="copyright"/> | |
| </appinfo> | |
| <documentation> | |
| Copyright (c) 2000, 2008 IBM Corporation and others.<br> | |
| This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at <a href="https://www.eclipse.org/legal/epl-2.0">https://www.eclipse.org/legal/epl-v20.html</a>/ | |
| SPDX-License-Identifier: EPL-2.0 | |
| </documentation> | |
| </annotation> | |
| </schema> |