473,378 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

XSLT Using Firefox 1.5.0.7

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
4 2109

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

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.*****@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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: RC | last post by:
First, let me say I couldn't find a group discuss XML/XSLT. So I only choose the closest groups to post this message. Here is part of my *.xsl file <xsl:stylesheet...
14
by: David Blickstein | last post by:
I have some XML documents that I want to open in a web browser and be automatically translated to HTML via XSLT. I'm using an xml-stylesheet processing command in a file called "girml.xml". ...
6
by: Pete Verdon | last post by:
Summary: Can I do an XSLT transform, in the client, of a tree of nodes taken from the displayed page DOM in IE? This works in Firefox. Hi, I'm just starting the process of rewriting part of a...
7
by: shaun roe | last post by:
Hi, I am using an XSLT to generate an SVG client-side in Firefox. The user opens an XML file in Firefox and sees a display. In doing so, I have to convert from cartesian to polar coordinates, so...
4
by: shaun roe | last post by:
I should like to count the frequency of strings embedded in a longer string, space separated. Specifically, I have: <phiModule> 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 8 5 5 5 6 6 6 7 7 7 7 7 7 7 7...
7
by: Zzzbla | last post by:
Hi all, anyone has a live example of loading an xml file from a server, an xslt file from the server, then transforming the xml using the xslt and outputing the results (preferably with...
7
by: HP17 | last post by:
I’m able using Javascript to transform a XML file using XSLT to a nice HTML output. What I need to do now is to combine two XML files and transform them together using XSLT. Here an abstract example:...
1
by: Zhang Weiwu | last post by:
Hello. I know a lot of different ways to write css that work for IE but ignored by Fx, but is there a way to let IE process XSLT but leaving Fx completely ignore the XSLT? The classic filter...
4
by: th1421 | last post by:
Hi, I'm new to FireFox. I am currently trying to convert my website to be compatible with it. Doing so I’m trying to process some XML/XSLT pages (preferably without using JavaScript). When I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.