Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
XSLT Editor and Debugger
Enterprise Architect provides facilities for modeling and executing XSL Transformations, which you use to convert input documents into xml or other types of document using XSL stylesheets. These facilities include:
· | Custom editing of .xml and .xsl files |
· | XML document validation |
· | Stylesheet debugging |
You can model a transformation using either file system files or model documents (Artifacts, where the file contents are stored in the model and can thus be shared by users of that model), on a custom XML Transform diagram. On this diagram you can create xml documents and stylesheets, link them to a transformation (Activity) and then execute or debug the transformation. The progress and success/failure of the transformation is shown on the XSLT tab of the System Output window. If you want to capture and review the output, you can optionally direct it via your model to an output file.
Create the XML Transform Diagram
Step |
Action |
See also |
---|---|---|
1 |
In the Project Browser, right-click on the appropriate Package and select the Add Diagram option.
|
|
2 |
In the New Diagram dialog, type an appropriate diagram name in the Name field (if necessary) and click on Extended in the Select From list and XML Transform in the Diagram Types list. Click on the OK button. The new diagram opens, with the Diagram Toolbox showing the XML Transformation page. |
|
Artifact Elements in the XML Transformation Toolbox
Artifact |
Description |
Inputs |
Outputs |
---|---|---|---|
XML Transform |
The model reference for the transformation, providing inputs and optional outputs. Used to run or debug the transformation.
|
XML File XSLT |
Output Artifact (Optional) |
XSLT |
Identifies the stylesheet to execute.
|
|
|
XML File |
Identifies the input to transform.
|
|
|
XSD |
Identifies the schema that can be used, optionally, to automatically perform XML validation on the output document. |
Output Artifact XML File (Both optional.)
|
|
Manually Validate documents
Using Enterprise Architect, you can perform XML validation both of documents to be transformed and of XSLT stylesheets.
To run the validation, right click in the xml document or stylesheet in the XSL Debugger and select XML Validation. A prompt displays to confirm if you are validating against a document type definition or an XML Schema.
· | For a document type definition, simply click on the OK button; the validation proceeds |
· | For an XML schema, select the appropriate radio button to identify if the validation grammar is defined within the document or elsewhere; if elsewhere, enter the namespace and URL or file path for the grammar |
If errors are found during a debugging run, they will be output to the Debugger window (press Alt+8 to display this window).
If errors are found during a normal validation run, they will be output to the XSL tab of the System Output window (press Ctrl+Shift+8 if this window does not display automatically). To locate the error in the document, double click the error message.