>Basic XML aware XPath assistance

>As discussed earlier in the End of Year Cramps entry, we had a request within XSL Tools to support being aware of the input XML file . I’ve implemented some very basic support based on the namespaces that have been defined in the stylesheet. This is available in the latest integration build now that webtools 3.1M4 has been declared. This feature will be available in 1.0M5.

This leverages the ContentModel from the base xml editor to know what elements are available. In order for this to work, either the appropriate schemalocation, DocType or preferably XML Catalog entry needs to be made. It is preferable to setup the namespaces in the XML Catalog that way you are not cluttering up the stylesheet with schemalocation markup.

If the namespace has been defined within the stylesheet, then it will show up as a proposal within the XPath completion for select, test, and match attributes. Also if you don’t have a grammar defined, it will try and use the inferred grammar if that preference option is checked for the xml editor.

Patches to enhance the compleation and fix the few odd ball bugs in the implementation are welcomed.

This entry was posted in eclipse, xml, xsl, xslt. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s