com.esri.arcgis.geoprocessing.tools.conversiontools
Class XSLTransform
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.conversiontools.XSLTransform
- All Implemented Interfaces:
- GPTool
public class XSLTransform
- extends AbstractGPTool
Uses the .NET 3.5 XML software to transform an ArcGIS item's metadata or any XML file using an XSLT 1.0 stylesheet and save the result to an XML file.
The XSLT Transformation tool is contained in the Conversion Tools tool box.
Usage tips:
- The output file produced by an XSLT stylesheet may be formatted as XML, HTML, or text, for example. The default output file name that will be provided by this tool will have a .xml file extension. If the XSLT stylesheet you are using does not produce an XML file you should provide a file name with a more appropriate file extension.
- This tool can't process an ArcGIS item's metadata or a stand-alone metadata XML file using the XSL stylesheets provided with ArcGIS Desktop 9.3.1 and earlier versions because they don't use XSLT 1.0 technology. They use an older technology that is not supported by the .NET 3.5 Framework. These XSL stylesheets also can't be used with the ArcGIS metadata editor.
- The XSLT Parameter can be used to pass a string or an XML file name to an XSLT stylesheet which can then use it to modify an item's metadata. For example, an XSLT stylesheet could take a phone number passed in as a string and update all phone numbers in the metadata. If an XML file is passed in with this parameter, an XSLT stylesheet can merge the information it contains with the source metadata.Refer to the add unique identifier.xslt file provided with ArcGIS for an example of how to pass in a value and merge upgraded FGDC with existing.xslt for an example of merging information in a separate XML file with an ArcGIS item's metadata.
- If you want to create a custom XSLT stylesheet to display or export metadata or XML files in ArcGIS, refer to the Microsoft documentation for the .NET 3.5 Framework for a complete list of the XSLT and XPath elements, functions and syntax that it supports. These are the only functions that can be used with this tool and in the ArcGIS metadata editor.If you want to use your custom stylesheet both inside and outside ArcGIS you will have the best chance of success if you limit yourself to using XSLT 1.0 and XPath 1.0 elements, functions, and syntax. Non-Microsoft applications are unlikely to support any Microsoft-specific functions XSLT and XPath functions.
- XSLT stylesheets that are exclusively used with this geoprocessing tool and the ArcGIS metadata editor can use some custom XSLT functions provided with ArcGIS to improve metadata handling and display. To use these functions the XSLT stylesheet must reference the URI of the ESRI XSLT function namespace http://www.esri.com/metadata/. For example, .The ArcGIS XSLT functions must be prefaced by the prefix assigned to the ESRI XSLT function namespace. If the ESRI XSLT function namespace is assigned the prefix esri as in the above example the GuidGen() function would be used like this: .
- The Source Metadata parameter has a complex data type. If you use this tool in a model, create a variable for the Source Metadata parameter in ModelBuilder by right-clicking the tool, pointing to Make VariableFrom ParameterSource Metadata.
- If an ArcGIS item has metadata that was created in ArcGIS Desktop 9.3.1 or earlier using the FGDC metadata editor and the item's metadata has been upgraded to ArcGIS metadata, the ArcGIS metadata will continue to include the original FGDC metadata XML elements. The metadata will also include other ArcGIS metadata elements.You can export the original FGDC metadata elements using this tool with the _MPXML2.xsl file provided with ArcGIS. In the example above this file would only export the item's original FGDC metadata—the information displayed in the FGDC metadata section in the Description tab. The FGDC elements will be ordered correctly in the output XML file.The exported file can be published to a metadata catalog that requires information to be provided in the FGDC CSDGM metadata XML format. The exported file can be validated with the FGDC XML Schema or DTD, or the USGS metadata utility known as mp. The performs this operation internally before processing the metadata.
- Metadata that is published to an external Website in HTML format will be indexed by Internet search engines such as Google if the Web site exposes its content correctly.
Constructor Summary |
XSLTransform()
Creates the XSLT Transformation tool with defaults. |
XSLTransform
public XSLTransform()
- Creates the XSLT Transformation tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias