XSLT Using Firefox 1.5.0.7

S

simon.a.hulbert

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:eek:utput 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
 
A

Andy Dingley

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 <html> start tag is usually enough),
then see what you get.
 
M

Martin Honnen

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.
 
P

p.lepin

Andy said:
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 <html> start
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).
 
S

simon.a.hulbert

Andy said:
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 <html> start
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).

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top