A
A
Ali96642020-09-18 13:28:28
XSL & XSLT
Ali9664, 2020-09-18 13:28:28

Where did the error occur in the XSL?

Hello, I have applied styles to XML.

It throws the following error:

This page contains the following errors:
error on line 2 at column 9: Document is empty
Below is a rendering of the page up to the first error.
This document was created as the result of an XSL transformation. The line and column numbers given are from the transformed result.

The code:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="demo-1-1.xsl"?>
<pricelist>
  <book id="1" store="yes">
    <title>XML и IE5</title>
    <author>Алекс Гомер</author>
    <price>200</price>
  </book>
  
  <!-- Комментарий -->
  
  <book id="2">
    <!-- Супер книжка -->
    <title>Dimanic HTML</title>
    <author>Алекс Хоумер</author>
    <price>120</price>
  </book>
  
  <book id="3">
    <title>Технология XSLT</title>
    <author>Алексей Валиков</author>
    <price>150</price>
  </book>

  <book id="4" store="yes">
    <title>XSLT</title>
    <author>Стивен Холзнер</author>
    <price>170</price>
  </book>

  <book  id="5" store="yes">
    <!-- Супер книжка -->
    <title>Практическая криптография</title>
    <author>Михаил Масленников</author>
    <price>200</price>
  </book>

  <book id="6">
    <title>Реест Windows XP</title>
    <author>Джерри Хонейкатт</author>
    <price>250</price>
  </book>

  <book id="6">
    <title>Windows XP. Средства повышения производительности</title>
    <author>Уолтер Брюс</author>
    <price>250</price>
  </book>
  
  <book id="7">
    <title>Windows Script Host для Windows 2000/XP</title>
    <author>Андрей Попов</author>
    <price>220</price>
  </book>
  
  <book  id="9">
    <title>Excel 2002. Библия пользователя</title>
    <author>Джон Уокенбах</author>
    <price>260</price>
  </book>
  
  <book  id="10">
    <title>XML. Справочник</title>
    <author>Сандра Э. Эдди</author>
    <price>100</price>
  </book>

  <book  id="11">
    <title>Разработка защищенных Web-приложений на платформе Windows 2000</title>
    <author>Майкл Ховард</author>
    <price>250</price>
  </book>
  
  <book  id="12">
    <title>WAP-программирование на языке WML</title>
    <author>Михаэль Зеебергер-Вайхсельбаум</author>
    <price>150</price>
  </book>
  <test>test</test>
  
  test2
</pricelist>


XSL:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        HELLO
    </xsl:template>
</xsl:stylesheet>


PS Opened in other browsers, everything works. It just doesn't work in Chrome. What is the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question