Altova Mailing List Archives

Display an existing XML in browser as readable without modifying it.

From: "rk" <rajesh.kamisetty@-----.--->
Date: 6/14/2006 10:52:00 AM

I have the following library.xml file coming from a system, this can't
be modified.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
Discover America
I need to be able to display the above file in browser in readable
format. Here is the library.xsl.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
<xsl:template match="/">
    <table border="3" bgcolor="white" cellspacing="1" cellpadding="1">
      <xsl:for-each select="library/book">
            <xsl:value-of select="name"/>

How can I present library.xml in readable format in browser without
modifying the xml file itself?

I have come across two options, which don't work.

1) Add <?xml-stylesheet to refer library.xsl in library.xml. This
doesn't work because I don't want to modify library.xml

2) Create a new file libary_read.xml with the following content and
open it in browser.

<!DOCTYPE apage [
 <!ENTITY library SYSTEM "library.xml">

And modify library.xsl   to have   <xsl:for-each

When I open this file in InternetExplorer, I get the following error.
The standalone attribute cannot be used in external entities. Error
processing resource 'file:///C:/Documents and Settings/...

<?xml version="1.0" encoding="utf-8" standalone="no"?>

I think having standalone="no" in library.xml is forcing me out of this
option. If I remove standalone="no" it works. Since I can't modify
library.xml, this option also gets ruled out.

Rajesh Kamisetty


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.