Brett's Blog
Edit     New

Thursday, May 24, 2007

XSL Results

Feel free to leave comments here to leave me a message about XSL Results (coming soon to allow XSL transformation results to show up in Firefox by attaching an XSL stylesheet (local or URL) to the current page.

8 Comments:

  • Why doesn't XSL Results start a new line when it encounters one one in the .xsl? For example, the .xsl has:

    >html<
    >head<
    ...

    But XSL Results displays:

    >html<>head<...

    --

    Dennis

    By Anonymous Dennis, at Friday, 02 May, 2008  

  • I would use the Saxonica engine if you are not already. You might give me a simple example to work with, since when I do it, it shows up fine with a line break (using Saxon, the button in the top right).

    By Blogger Brett, at Friday, 02 May, 2008  

  • Oh, sorry, I hadn't considered your question well enough. XSL has special rules as far as whitespace preservation.

    http://www.dpawson.co.uk/xsl/sect2/N8321.html#d12393e342 has a good answer to this. You need to use <xsl:text> with an actual line break to make it work if the indent attribute doesn't work.

    By Blogger Brett, at Friday, 02 May, 2008  

  • Another option you have is to use the Saxon engine with an XSLT 2.0 stylesheet (i.e., <xsl:stylesheet version="2.0">) and then put an xml:space="preserve" on the <html> element.

    By Blogger Brett, at Friday, 02 May, 2008  

  • Here is a sample:

    http://kowallekfamily.com/genealogy/reports/desc-1766.xml

    When I look at this page with Microsoft's View XSL Output tool at least the linefeeds appear.

    I'm new to this. Is the Saxon engine a Firefox add-in that replaces Firefox's embedded engine? Where do I find it?

    --

    Dennis

    By Anonymous Dennis, at Friday, 02 May, 2008  

  • Saxon is an XSL processor which I've harnessed to use within my own extension. It handles XSLT 2.0 (which the built-in one for Firefox does not) and from what I can tell is an all-round better processor.

    XSL Results currently does not give the option to use Saxon for regular XSL transformations (such as when you load an XML file which has an XSL file attached). You can only use Saxon by clicking the button in the top right of the XSL Results dialog window. (You get to it from Tools->XSL Results). Did you see my other messages on the blog, as I mentioned this in one of them.

    By the way, I presume you've got the latest version of XSL Results (1.5.2) installed?

    By Blogger Brett, at Friday, 02 May, 2008  

  • I seem to be unable to xsl:include in my styleheet e.g.

    <xsl:include href="another.xsl"/>

    where another.xsl is in the same directory, I always get NS_ERROR_DOM_BAD_URI. Would it be possible to fix this?

    By Blogger ivan, at Sunday, 24 May, 2009  

  • @ivan, sorry for the delayed reply--blogspot was blocked for me in the country where I am now, even on a proxy I use, until now.

    I've added your request as a to-do to a file in the directory of the extension so hopefully at some point if I may have time and inclination, I can add support (though no promises at all, sorry to say). In the meantime, do absolute URL's work for <xsl:include>? Looks like you need some XSL to translate your XSL? :)

    By Blogger Brett, at Saturday, 04 July, 2009  

Post a Comment

Links to this post:

Create a Link

<< Home


Google
 
Brett's Blog Web