Subject:Preview issues: Javascript/CSS/ DHTML Base url Author:G Neal Date:07 Mar 2003 06:04 AM
Hope someone can assist with a problem...
The XSL I've got outputs HTML (actually the output is set to XML so I can output XHTML or close to it). This has style CSS and javascript includes which handle DHTML menus. The base url has been set and I've set the output to a HTML file.
Viewing the output saved HTML file everything is fine, but previewing in StylusStudio encounters javascript errors. What I have noticed is that Stylus Studio previews are in a temp directory so it seems it is ignoring the base url?
Subject:Re: Preview issues: Javascript/CSS/ DHTML Base url Author:Minollo I. Date:07 Mar 2003 09:42 AM
I think the problem is that you set your output method to XML; doing that
Stylus Studio doesn't generate the BASE element which is the one
responsible for setting the root directory against which relative paths are
computed.
Of course the BASE element has a meaning only when HTML is generated; even
if it would work for you too as you are generating XHTML, Stylus doesn't
know that (and is not smart enough to infer that information).
Waiting for XSLT 2.0 which will introduce an XHTML output method, we can in
the meanwhile address this issue by forcing Stylus to generate the BASE
element even when XML is set as the output method if a value for BASE is
set in the scenario and if the root element you generate in the output is
'xhtml' or 'html'...
We'll keep you informed on progress about this.
Thanks,
Minollo
Subject:Re: Preview issues: Javascript/CSS/ DHTML Base url Author:(Deleted User) Date:14 Mar 2003 03:51 PM
I have a similar problem, but I believe it relates to the extraneous SPAN tags that we saw back in 103h (in the external preview). Particularly the SPANs in Javascript sections, which are clearly illegal and are causing the described JS errors.
Perhaps someone could explain why Stylus creates the S_ attributes for each HTML node, as well as inserting SPANS, as the attached excerpt shows.
Subject:Re: Preview issues: Javascript/CSS/ DHTML Base url Author:Minollo I. Date:14 Mar 2003 04:26 PM
The SPAN tags and S_ attributes issue should only be present in the
internal preview pane; if you export the preview (using the latest build)
or if you preview in the external browser, those tags/attributes won't be
created.
If you still see SPAN/S_ tags/attributes using the external preview window,
you are likely not running the latest build available on http://www.stylusstudio.com/update (4.x section).
The SPAN tags and S_ attributes are created by Stylus to allow backmapping
from the HTML result into the XSLT source (and XML source in 5.0).
Subject:Re: Preview issues: Javascript/CSS/ DHTML Base url Author:(Deleted User) Date:14 Mar 2003 07:14 PM
Thanks for your swift response.
I am using 4.6.103q, and the JavaScript behavior I'm referring to occurs in internal preview only (In fact, we use external preview as a workaround, currently).
Thanks also for confirming the internal _S attribute/ SPAN usage, but since you refer to this as an "internal preview issue," may I assume that the illegal JavaScript SPANs will be replaced with some other script-friendly construct in a "near" future release?
Please don't misunderstand. The XSL-mapping feature is very helpful ... but the false JavaScript errors are quite annoying.
Keep up the great work - Stylus remains the BEST XML/XSLT IDE on the market!
Subject:Re: Preview issues: Javascript/CSS/ DHTML Base url Author:Minollo I. Date:14 Mar 2003 09:18 PM
>...
>Thanks also for confirming the internal _S attribute/ SPAN usage, but
>since you refer to this as an "internal preview issue," may I assume that
>the illegal JavaScript SPANs will be replaced with some other
>script-friendly construct in a "near" future release?
Can you send me the XSLT/XML files you are using? That could significantly
accelerate the solution of the problem.