Page 1 of 1
XSLT content complete seemingly not aware of related XML
Posted: Tue Jan 12, 2016 12:45 am
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!
Re: XSLT content complete seemingly not aware of related XML
Posted: Tue Jan 12, 2016 11:12 am
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
Re: XSLT content complete seemingly not aware of related XML
Posted: Tue Jan 12, 2016 7:54 pm
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
Re: XSLT content complete seemingly not aware of related XML
Posted: Wed Jan 13, 2016 11:28 am
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