By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,993 Members | 1,883 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,993 IT Pros & Developers. It's quick & easy.

XSLT Using Firefox 1.5.0.7

P: n/a
Hi, I'm trying to view the following xslt transformation using firefox

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
version = "1.0" >
<xsl:output method = "xml" indent = "yes" />
<xsl:attribute-set name = "set1" >
<xsl:attribute name = "a" >1</xsl:attribute>
<xsl:attribute name = "b" >2</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name = "set2" >
<xsl:attribute name = "cc" >33</xsl:attribute>
<xsl:attribute name = "dd" >44</xsl:attribute>
</xsl:attribute-set>

<xsl:template match = "/" >
<xsl:element name = "QQQ" use-attribute-sets = "set1
set2" >
<xsl:attribute name = "xxx" >555</xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

It looks to me that I should be able to see an xml tree being written,
regardless of the xml I use as input, but all I get is a blank screen
on firefox...am I missing something really obvious...this is my first
stab at xslt so feeling my way so far

Oct 17 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a

si*************@googlemail.com wrote:
It looks to me that I should be able to see an xml tree being written,
regardless of the xml I use as input, but all I get is a blank screen
on firefox.
It's probably working, as coded, but why do you think Firefox ought to
display it? Firefox is a web browser for displaying HTML. Try using
your XSLT to give it some HTML (a <htmlstart tag is usually enough),
then see what you get.

Oct 17 '06 #2

P: n/a
si*************@googlemail.com wrote:
It looks to me that I should be able to see an xml tree being written,
regardless of the xml I use as input, but all I get is a blank screen
on firefox...
It would be better if you posted a URL but I guess Firefox renders the
result XML of the transformation but that result has only empty elements
with some attributes so you won't see any content in the browser window.
An XML tree is only displayed if an XML document loaded in a browser
window is _not_ associated with a stylesheet. If you provide a
stylesheet then that is applied and the result is rendered but if there
is no element content then you won't see anything displayed.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 18 '06 #3

P: n/a

Andy Dingley wrote:
si*************@googlemail.com wrote:
Hi, I'm trying to view the following xslt
transformation using firefox
[XSLT]
It looks to me that I should be able to see an xml tree
being written, regardless of the xml I use as input,
but all I get is a blank screen on firefox...am I
missing something really obvious...this is my first
stab at xslt so feeling my way so far
It seems that Firefox only displays the XML tree in case
there's no stylesheet specified. Since you *have* specified
a stylesheet, naturally, Firefox expects that this
stylesheet provides all the information necessary for
displaying the XML. If you add a text node to your
resulting XML, you'll see that it *is* displayed after the
transformation.
It's probably working, as coded, but why do you think
Firefox ought to display it? Firefox is a web browser
for displaying HTML...
....XHTML, XML, text/plain and probably half a zillion other
formats.
Try using your XSLT to give it some HTML (a <htmlstart
tag is usually enough), then see what you get.
That's not necessary. XML would do, if there was anything
*but* the element and attribute nodes in the resulting XML.

As a matter of fact, I am using Firefox for viewing my
XMLs, including transformation output files. The simple
solution is using a server-side XSLT processor for
transformations (libxslt-based PHP5 XSL module in my case).

--
Pavel Lepin

Oct 18 '06 #4

P: n/a

p.*****@ctncorp.com wrote:
Andy Dingley wrote:
si*************@googlemail.com wrote:
Hi, I'm trying to view the following xslt
transformation using firefox

[XSLT]
It looks to me that I should be able to see an xml tree
being written, regardless of the xml I use as input,
but all I get is a blank screen on firefox...am I
missing something really obvious...this is my first
stab at xslt so feeling my way so far

It seems that Firefox only displays the XML tree in case
there's no stylesheet specified. Since you *have* specified
a stylesheet, naturally, Firefox expects that this
stylesheet provides all the information necessary for
displaying the XML. If you add a text node to your
resulting XML, you'll see that it *is* displayed after the
transformation.
It's probably working, as coded, but why do you think
Firefox ought to display it? Firefox is a web browser
for displaying HTML...

...XHTML, XML, text/plain and probably half a zillion other
formats.
Try using your XSLT to give it some HTML (a <htmlstart
tag is usually enough), then see what you get.

That's not necessary. XML would do, if there was anything
*but* the element and attribute nodes in the resulting XML.

As a matter of fact, I am using Firefox for viewing my
XMLs, including transformation output files. The simple
solution is using a server-side XSLT processor for
transformations (libxslt-based PHP5 XSL module in my case).

--
Pavel Lepin
Hi Guys, thanks for all the replys, I guess the question I have now is
whether there is a way to specify that the output of a transformation
is saved into a file, which is the result that I want in the end...do I
have to do this in a java class?

Oct 18 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.