Extends the model by parsing another resource and adding the resulting DOM to the model.
The resource may reside in the pattern or in an Eclipse project. The resource's file type is used to choose the appropriate parser.
See also <inlineExtend>
Tag Summary | |
---|---|
required |
<extend resource="value" name="value" location="value" /> |
full tag |
<extend resource="value" name="value" location="value" type="value" /> |
Required Attributes |
|
---|---|
resource | The project relative path of the resource to be parsed. |
name | A variable name to associate with the document root of the DOM produced by the parse. Note that this node is not the top-level element visible in the file, but rather that node's parent |
location | Indicates where the resource can be found and can be one of three values: "pattern", "source" and "target". A location of "pattern" means the resource can be found in the pattern (project or .patzip file). A location of "source" means the resource is in the project containing the primary input, or "appdef", file. A "target" location means the resource is located in the current target project which is the default project when the project attribute is not specified on a start tag. Note that the target project can be changed with the targetProject tag. |
Optional Attributes | |
---|---|
type | Clarifies the resource filetype if it not provided. |
Example | |
---|---|
<extend resource="/lookup/types.xml" name="java" location="pattern" type="xml" /> This extend tag finds a file named "/lookup/types.xml" in the pattern, parses it and associates the document root node with the name "java". Subsequent template tags can use this name to navigate to model nodes in the DOM created by the parse. For example, if the top level element in that XML file is named "types", then template tags can now refer to that model node using the query expression "java/types". |
© Copyright IBM Corporation 2000,
2006. All Rights Reserved.