XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Flatten an XML source (2)
-> + Problem in navigating tree (2)
-> + preserve line breaks in xml at... (4)
-> + XSLT to PDF (2)
-> + Replace a nodeset with another... (3)
-> + Nested variable compile error ... (5)
-> + Replace a nodeset with another... (2)
-> + StackOverFlow Error, while com... (4)
-> + Footnote - WORDML (6)
-> + Concatenate same input element... (3)
-> + Need to remove the sub element... (3)
-> + Grabbing sub-namespace values (2)
-> + Converting date via browser XS... (4)
-> + Selecting Attribute nodes (2)
-> + XSLT totaling numeric values (4)
-> + Two line output by breaking on... (3)
-> + Encoding Option for base64Bina... (2)
-> + using document and web service... (2)
-> + XSLT transformations with JDK1... (8)
-> - Parsing Excel XML - Selectiing... (1)
-> + Grouping this xml input very n... (2)
-> + XSL-FO page-sequence and blank... (2)
-> + Need Help In XSLT Mapping (3)
-> + how to create the Tables by co... (2)
-> + fo:external-graphic - Image ... (2)
-> + Mapping complex document with ... (8)
-> + Sorting in XSLT (2)
-> + xsl date time adding... (16)
-> - Flat XML to nested XML convers... (1)
-> + parser for parsing XSL file (2)
-> - q on group function (1)
-> + compare 2 date value using xsl (2)
-> - Remove namespaces from SOAP pa... (1)
-> + Numeric string not displaying ... (3)
-> + where is the old HTM to XSL wi... (2)
-> + XSLT variable path (2)
-> + Sort by lookup values & styles... (2)
-> + Hi without hard code filed na... (2)
-> + XSLT output does not work (2)
-> + How can I do this javascript i... (2)
-> + Paging with XSL and passing UR... (2)
-> + XPath Condition Query (3)
-> + Xalan Multiple XML Output Over... (3)
-> + Inserting Line Break (2)
-> + Get Value from non-standard xm... (2)
-> + Root node renaming and adding ... (2)
-> + Cannot get CDATA to render pro... (2)
-> - How to add a footer on reports... (1)
-> - Apply-templates and processing... (1)
-> + Help Please - Use data from no... (5)
-> - Behaviour of trace function (1)
-> + How to Build a Dynamic XPath E... (3)
-> - raw xml to generic xml (1)
-> - Merging two documents (1)
-> + XSLT Path help (3)
-> + how to sort, dates in xsl ? (3)
-> + Naming elements (3)
-> + XSL IF Statement (2)
-> + XSLT Help Needed (4)
-> + Character Increment (4)
-> - concat function not working wi... (1)
-> + XSLT only namespace attribute ... (2)
-> - using uri within RSS enclosure... (1)
-> + Transforming Data With XSLT (3)
-> + Validate XPath on variable (8)
-> - flatten xml structure then sor... (1)
-> + SYNTAX not working (2)
-> + Looping through xml document (3)
-> + can i modify the xml data in X... (2)
-> + can i modify the xml data in X... (2)
-> + regex (2)
-> + xslt document and web services... (2)
-> + looping question (2)
-> + XML to Excel Conversion using ... (4)
-> + Compare (2)
-> + problem in loadxml function (2)
-> + does IE support script in xsl (2)
-> + converting Time format (2)
-> + Single Message split into Mult... (5)
-> + xml template design (2)
-> + String to array (2)
-> + Page Break with XSL-FO (4)
-> + Need help Translating string (2)
-> + Transforming input xml paramet... (3)
-> + How to transform node from inc... (2)
-> + XSL:FO Marker Question (2)
-> + trim after character...? (2)
-> + Convernting CSS + xsl to XSL:F... (2)
-> + save external image in xml/xsl (3)
-> + Table of Contents (2)
-> + Problem with select expression (2)
-> + Slow for-each select (7)
-> + Restructuring XML (2)
-> + Coloring xml output (3)
-> + Looping through xsl based on a... (5)
-> + Where is the wizard? (3)
-> + Save XML thru href (2)
-> + existing xslt, source and dest... (5)
-> + spliting xml files by certain ... (8)
-> + checking condition and writing... (2)
-- Previous [481-500] [501-520] [521-540] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Kenneth LeeSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Kenneth Lee
Date: 12 Oct 2004 01:18 AM
Originally Posted: 12 Oct 2004 12:15 AM
I don't have an offline driver so I'm using Netscape 7.2 to do my translating.

I used

<xsl:output method='xml' version="1.0" indent='yes'
standalone='yes' omit-xml-declaration='no' />
to try to create an xml header when none of my tags were showing up on screen.
Saving the page shows the tags, but has no change because of the above command.
Tried various other things without success.
When I tried Microsoft Internet Explorer, it redirected to a new window in Netscape.
<!--
<xsl:variable name='startXml' select='&lt;?xml version="1.0"?&gt;'/>
<![CDATA[<?xml version="1.0"?>]]>
-->
I think the ? terminates both of these with an invalid character, but doesn't show what it really is complaining about.
Removing the ? does remove the error message, but doesn't make the file xml.

I later found this:
<xsl:processing-instruction name='xml'>version="1.0"</xsl:processing-instruction>
If I save and open the page, I get normal XML browser output, but the direct xml conversion still strips and hides all tags from the view.
I'd like to see the converted xml output file without first saving it.

Interesting little edit feature. You enter text with linefeeds originally, it enters <br> commands.
then you edit it, it retains the linefeeds and shows <br> in the text. When you re-post, <br> becomes part of the
text and all linefeeds go away.

Postnext
Tony LavinioSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Tony Lavinio
Date: 12 Oct 2004 10:51 AM
It's not clear exactly what you are doing. Are you running the transform
in Stylus, saving the output, and then trying to view it in IE and/or
Netscape? Are you using a webserver, or just looking at files in the
filesystem? Are you depending on IE's XSLT engine, or Netscape's? Did
you use an .xml document with an xsl-stylesheet PI, as specified in
http://www.w3.org/TR/xml-stylesheet/ ?

Postnext
Kenneth LeeSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Kenneth Lee
Date: 12 Oct 2004 05:13 PM
I have a file on my PC with an .xml extension, it links to a file with an .xsl extension.
I double click the .xml file from Windows Explorer, it brings up Netscape which shows just a string of text.
If I copy the file:: link, manually bring up Internet Explorer, copy the link and hit enter, it brings up a new Netscape window which shows just a string of text.
If I copy the Netscape page to another .xml file and double click that file, I get a well formed XML document output listing instead of a string of text.

Originally I asked how to put in the <?...?> processing command. More reading answered that question. Now I'm wondering why I'm not getting XML output when I'm sending XML input and if there is a cure for that.

Postnext
Kenneth LeeSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Kenneth Lee
Date: 12 Oct 2004 05:19 PM
Originally Posted: 12 Oct 2004 05:16 PM
Whoops, meant "...bring up Internet Explorer, paste the link and hit enter..."<br> Considering what edit did to me the first time, this time I'll just add a reply instead.

Postnext
Ivan PedruzziSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Ivan Pedruzzi
Date: 12 Oct 2004 05:41 PM
Kenneth,

1) In your system the .xml file extension is associated to netscape
this is way when double click it opens Netscape

2) IE renders .xml file using a default stylesheet unless xml-stylesheet PI is defined
like that

<?xml-stylesheet type='text/xsl' href='my.xsl'?>

Could you show us the XSLT + XML you are using?

Ivan

Postnext
Kenneth LeeSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Kenneth Lee
Date: 13 Oct 2004 01:17 AM
I don't mind going to Netscape as my default as long as it works properly.
Note that something in my configuration has disabled IE from rendering XML files. Probably happened when I downloaded Netscape 7.2. I don't know if rendering problem exists there as well
Here are my files:


FormExample2.xml:
<?xml version="1.0"?>
<!--
-->
<?xml-stylesheet type="application/xml" href="FormExample2.xsl"?>

<warehouse>
<item>
<name>orange</name>
<country>USA</country>
</item>
<item>
<name>ice wine</name>
<country>Canada</country>
</item>
<item>
<name>apple</name>
<country>USA</country>
</item>
</warehouse>




FormExample2.xsl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='xml' version="1.0" indent='yes'
standalone='yes' omit-xml-declaration='no' />

<xsl:template match="/">
<!--
<xsl:variable name='startXml' select='&lt;xml version="1.0"&gt;'/>
<![CDATA[<?xml version="1.0"?>]]>
-->
<xsl:processing-instruction name='xml'>version="1.0"</xsl:processing-instruction><xsl:apply-templates/>
</xsl:template>

<xsl:template match="warehouse">
<storage>
<title>Transform data</title>
<xsl:apply-templates select='item/country' />
</storage>
</xsl:template>

<xsl:template match="text()|@*">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="country">
<country>
<xsl:apply-templates />
<xsl:apply-templates select='../name' />
</country>
</xsl:template>

<xsl:template match="name">
<xsl:copy-of select="."/>
</xsl:template>

</xsl:stylesheet>




What I see in Netscape:
Transform dataUSAorangeCanadaice wineUSAapple



FormExampleoUT.xml(saving rendered page from Netscape):
<?xml version="1.0"?>
<storage><title>Transform data</title><country>USA<name>orange</name></country><country>Canada<name>ice wine</name></country><country>USA<name>apple</name></country></storage>

Postnext
Ivan PedruzziSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Ivan Pedruzzi
Date: 13 Oct 2004 03:50 PM
kenneth,

The problem is that Netscape renders the xml document (the result of the transformation) as it was HTML.
What you see are the tag values; tags that are not HTML are ignored.

Netscape doesn't have a default stylesheet like IE does to display xml documents as HTML
If you type in IE res://msxml/defaultss.xsl you can see the transformation (written in the old xsl standard)

You don't need to create manually the xml pi, XSLT does it for you.

I still can't parse this

> FormExampleoUT.xml(saving rendered page from Netscape):
> <?xml version="1.0"?>
> <storage><title>Transform data</title><country>USA<name>orange</name></country><country>Canada<name>ice wine</name></country><country>USA<name>apple</name></country></storage>


Ivan

Postnext
Kenneth LeeSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Kenneth Lee
Date: 13 Oct 2004 08:40 PM
If I display FormExampleoUT.xml on Netscape, it gives me a warning message that it doesn't have a xslt document assigned and then displays the XML in a format that looks just like I remember IE doing with tags, colapsable(sp?) links, etc.

Posttop
Ivan PedruzziSubject: Using XSLT to create XML output - how do I put in xml tag?
Author: Ivan Pedruzzi
Date: 14 Oct 2004 12:03 AM
Kenneth

Let me more precise, Netscape is able to render xml documents when loaded from URL
but seems to use a different execution path with the xslt transformation result.

Ivan

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.