XML in XSL format in chrome cannot be displayed

Source: Internet
Author: User

Today, I tested XSL Formatting XML. The result is not displayed in chrome. If Firefox is used, IE8 can be displayed normally.

After a long period of practice, the solution was obtained.

At the beginning, we used a common file system for testing. That is to say, we put XML and XSL in the same folder and then view XML in the browser, firefox and IE can both be normally displayed, but chrome cannot be displayed. Later I thought it was impossible for chrome to be so advanced. Then, the folder is stored in the directory of the Web server, and chrome displays the correct page.

 
<?XML version = "1.0" encoding = "ISO-8859-1"?>
 
<?XML-stylesheet type = "text/XSL" href = "tool. XSL"?>
<Tool>
 
<Field ID="Prodname">
<Value>Hammer hg2606</Value> 
 
</Field>
<Field ID="Prodno">
 
<Value>32456240</Value> 
</Field>
 
<Field ID="Price">
<Value>$30.00</Value> 
 
</Field>
 
</Tool>
 
 
The above is XML, and the following provides XSL
 
<?XML version = "1.0" encoding = "ISO-8859-1"?>
 
<! -- Edited with XML spy v2007 (http://www.altova.com) -->
 
 
<XSL:Stylesheet Version="1.0" Xmlns:XSL=Http://www.w3.org/1999/XSL/Transform">
 
 
<XSL:Template Match="/">
 
<Html>
 
<Body>
<Form Method="Post" Action="Edittool. asp">
 
<H2>Tool information (edit ):</H2>
<Table Border="0">
 
<XSL:For-Each Select="Tool/field">
<Tr>
 
<TD>
 
<XSL:Value-Of Select="@ ID"/>
</TD>
 
<TD>
 
<Input Type="Text">
    XSL :  attribute   name  = " ID " >    XSL :  value - of   select  = " @ ID " />     XSL :  attribute  > 
    XSL :  attribute   name  = " name " >    XSL :  value - of   select  = " @ ID " />     XSL :  attribute  > 
    XSL :  attribute   name  = " value " >    XSL :  value - of   select  = " value " />     XSL :  attribute  > 
</Input> 
 
</TD>
 
</Tr>
</XSL:For-Each>
 
</Table>
 
<BR />
    input   type  = " Submit "  id  = " btn_sub "  name  = " btn_sub "  value  = " Submit " />  
<Input Type="Reset" ID="Btn_reset" Name="Btn_reset" Value="Reset" />
 
</Form>
</Body>
 
</Html>
 
</XSL:Template>
    XSL :  stylesheet  > 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.