Better reporting of missing named templates in XSLT

Are you missing a feature? Request it's implementation here.
jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

Better reporting of missing named templates in XSLT

Post by jokester01au » Wed Jan 03, 2007 5:16 am

At the moment, if stylesheet A imports stylesheet B, which calls several named templates that exist in stylesheet A, then oxygen will report errors at each of the call-template instructions in B.

However, stylesheet A may be run without problems, because once it imports B, all of the call-template instructions in B become valid.

It would be great if Oxygen was able to avoid flagging these pseudo-errors in stylesheet B. I realise that by itself stylesheet B is correctly reported as erroneous. However, because it is valid in the context in which it is being used, all of these pseudo-errors make debugging and finding real errors that much harder.

I realise that this is non-trivial. One solution that I can think of may be to report errors within the context of the currently selected debugging config. That is, if the debugger is set up to run stylesheet A, then use that context to validate all of the stylesheets which A imports/includes.

The reason I have this dependency relationship is because of http://www.biglist.com/lists/xsl-list/a ... 01058.html

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Wed Jan 03, 2007 4:09 pm

Hi,

The problem is more generic, it affects not only XSLT but also XQuery, Relax NG and even XML itself, if you look at the external entities that cannot include a DOCTYPE declaration and if they will contain entity references then they will be not wellformed by themselves but wellformed if referred from a document that specifies the DTD.
We plan to address this in he short/medium term and allow users to specify/manage master files when editing modules.
If you have any ideas, suggestions from the point of view of a user, how you will find easy to specify this dependency we will be happy to hear them.

Best Regards,
George
George Cristian Bina

jokester01au
Posts: 64
Joined: Tue May 17, 2005 9:16 am

Better reporting of missing named templates in XSLT

Post by jokester01au » Fri Jan 05, 2007 3:15 am

You are correct about the wider context of this problem.

My suggestion would be to identify where there are hints that already exist within oxygen as to the intended context of the currently edited file.

For example, in the XSLT debugging context, the run mechanism already attempts to compile the stylesheeton the basis of the context selected by the debugger. When editing XSLT in the debugger context, it would be ideal for the error reporter to compile on this basis.

This is an ideal scenario. If you are able to provide a manual mechanism to specify such context in the short term that would also be good.

The stylesheet I am currently working on uses a library file which is used in several included stylesheets, but can only be imported by the master sheet. This has led to around 50 pseudo-errors which substantially complicate debugging, and so even a stopgap solution would be most appreciated.

Post Reply