aspose file tools*
The moose likes Java in General and the fly likes XSL is not applied with XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "XSL is not applied with XML" Watch "XSL is not applied with XML" New topic
Forums: Java in General XML and Related Technologies
Author

XSL is not applied with XML

jai yadav
Greenhorn

Joined: Aug 13, 2014
Posts: 3
Hi ,

We are having the XMLs. We need to show this as HTML while viewing document from browser.
We have implemeted it such that DTD is invked from XML file and DTD internally calls the XSL file.

This was working fine in upto IE 8. But it is not working in IE9 and IE 10. We have implemented like as shown below:
XML File:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE RECORD SYSTEM "file:C:/Users/nc4716/Viewed/ABC_XML/ABC_XML.dtd">

DTD File:

<?xml-stylesheet type="text/xsl" href="http://<SERVER_HOST>:5080/myapp/custom/ABC_XML.xsl"?>

If we include the below line directly in XML :
<?xml-stylesheet type="text/xsl" href="http://<SERVER_HOST>:5080/myapp/custom/ABC_XML.xsl"?>
But we need to chnage all the XMLs for this which is not possible.
Please suggest . Thanks in advance
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2531
    
    8

Welcome to the Ranch.

So is there a "xsl" file that actually process the xml to html? The DTD file act as a schema for the XML data file.

I'm not going to suggest it but I ought to say it: it would be better to use a XML schema (xsd) file rather than DTD.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
jai yadav
Greenhorn

Joined: Aug 13, 2014
Posts: 3
Hi,

Thanks for your quick response,

But actually all xml's are created in past and now it is not possible to change the XMLs. The implementation XML->DTD->XSL was working fine upto IE8.
But now it is not working.

It would be great if we can get solution without changing the XML
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2531
    
    8

How is it not working in IE9 and IE10? Blank screen or what?

Does it work in Firefox or Chrome?
jai yadav
Greenhorn

Joined: Aug 13, 2014
Posts: 3
Hi,

It is just opening as XML in IE9,IE 10 ,Mozila and Chrome but working fine upto IE8.

I also tried to make some errors in DTD file and still it is opening XML file as XML .
That means IE 9 and IE 10 are not even reading the line <!DOCTYPE RECORD SYSTEM "file:C:/Users/nc4716/Viewed/ABC_XML/ABC_XML.dtd"> .

Regards,
Jai
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSL is not applied with XML