XSLT content complete seemingly not aware of related XML

Having trouble installing Oxygen? Got a bug to report? Post it all here.
kellymc
Posts: 2
Joined: Mon Jan 11, 2016 11:58 pm

XSLT content complete seemingly not aware of related XML

Post by kellymc »

I've got a project with 2 master files, one XML and one XSLT. When I'm editing the XSLT file, the content complete window pops up and offers standard Xpath options (ancestor::, etc.) but nothing specific to the structure of my XML document.

I'm expecting to be able to type a slash at the end of an Xpath string and see possible child nodes from my XML -- I was creating a different transformation last month and this is how it behaved. It no longer does so.

I'm relatively new to Oxygen and still using the XML Developer trial, but I don't believe I made any configuration changes between when it worked before and now.

Any suggestions would be appreciated.

Thanks!
tavy
Posts: 364
Joined: Thu Jul 01, 2004 12:29 pm

Re: XSLT content complete seemingly not aware of related XML

Post by tavy »

Hello,

When you are editing you XSLT file, in order to get in the content completion window the element from the XML document, you need to associate the XSLT file with the XML file using a transformation scenario.
You ca read more about the content completion support in XSLT in our user manual or watch this video titorial.
There are also some webinars dedicated to the XSLT development with oXygen. You cand check out our video tutorials page and search for XSLT. Here you can see how to associate an XML with an XSLT using a transformation scenario.

The master file support is used to validate a module in the master file context, to present in the content completion window all the components that can be used in a context, to see the all components in the Outline view and also for the refactoring operations.
You can read more about this in out user manual or you can watch this tutorial about the XSLT master file support.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
kellymc
Posts: 2
Joined: Mon Jan 11, 2016 11:58 pm

Re: XSLT content complete seemingly not aware of related XML

Post by kellymc »

Octavian,

I revisited the Transformation Scenarios and got it working. I had created one, but used "${currentFileURL}" instead of the explicit file address for the XML URL, which must have been incorrect. I also notice that if multiple scenarios are selected, it doesn't work.

Thanks for your help!

Kelly
tavy
Posts: 364
Joined: Thu Jul 01, 2004 12:29 pm

Re: XSLT content complete seemingly not aware of related XML

Post by tavy »

Hi Kelly,

If you associate multiple transformation scenarios with an XSL file, in the content completion window you will get only the elements/attributes from the first associated XML file.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply