Re: [xsl] stylesheet organisation

Subject: Re: [xsl] stylesheet organisation
From: George Cristian Bina <george@xxxxxxxxxxxxx>
Date: Fri, 02 Sep 2011 22:38:44 +0300
Hi Tom,

On 9/2/11 6:20 PM, Tom T wrote:

By doing it the way we have I appreciate we are missing out on some of those extra things Oxygen offers

My point was that oXygen supports this use case, if you define a validation scenario and specify the main entry XSLT file then you will have full support for both validation and editing.
I think Andrew referred to the fact that this is not generally supported by other tools, thus my suggestion to define a missing variable or a function in the XSLT module to avoid the validation errors.


but I felt it was more important to architect the stylesheets in a way that suited our requirements rather than be suited the editor we were going to be editing in (for example we do not import / include stylesheets more than once).
Similarly We're not keen on adding components to a stylesheet that have no use beyond assisting an editor. To get around the validation issue, yes, we make sure we only validate the file from the entry level stylesheet.


----------------------------------------
Date: Fri, 2 Sep 2011 17:30:53 +0300
From: george@xxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
CC: tomxsllist@xxxxxxxxxxx
Subject: Re: [xsl] stylesheet organisation

It is not only the validation that fails... if the tool will normally
offer you editing help by looking into the stylesheets for defined
templates, variables, functions, etc. then you will loose that as well.

oXygen supports this though validation scenarios where you can define
the main (entry point) stylesheet to be used instead of the one you edit.

One possibility to overcome this (if there is no support in the tool) is
to define the referred components at the top of the stylesheet with an
empty value or generating an error message that there is no proper
definition for that component and reply on the import precedence to
bring in the actual definition from the importing stylesheets - but this
may hide errors when the module is imported from another stylesheet that
does not define all the components, or it will delay their detection
until runtime.

Best Regards,
George
--
George Cristian Bina
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 9/2/11 5:08 PM, Tom T wrote:

Ah yes, then I still get those error messages but just choose to ignore them, I don't find them useful in the debugging process anyway.


----------------------------------------
Date: Fri, 2 Sep 2011 14:55:48 +0100
From: andrew.j.welch@xxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] stylesheet organisation

They are imported once in each entry level stylesheet, this ensures they will only ever be imported once, - not sure what you mean by 'rely on tools to be aware of that'?

If you have 3 stylesheets, 'a', 'b' and 'c'.


If a imports both b and c, then you can refer to things in b from c,
however your editor would complain about the missing things unless it
knows about the entry point a.



--
Andrew Welch
http://andrewjwelch.com


Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Current Thread