Skip to content

XML: parse xml/chapter1/chapter1.xml failed #491

@wzru

Description

@wzru

I am trying to parse each xml file in ./xml folder to extract the pure text of SICP-JS. But an error occurred while parsing here:

<!-- Section 1 : The Elements of Programming -->
&section1.1;
<!-- Section 2 : Functions and the Processes They Generate -->
&section1.2;
<!-- Formulating Abstractions with Higher-Order Functions -->
&section1.3;

Error message:

XML syntax error on line 482: invalid character entity &section1.1;

It seems that the entity info is in xml/contents.ent so the parser cannot find it:

sicp/xml/contents.ent

Lines 4 to 13 in 4ccae66

<!ENTITY chapter1 SYSTEM "chapter1/chapter1.xml">
<!ENTITY section1.1 SYSTEM "chapter1/section1/section1.xml">
<!ENTITY subsection1.1.1 SYSTEM "chapter1/section1/subsection1.xml">
<!ENTITY subsection1.1.2 SYSTEM "chapter1/section1/subsection2.xml">
<!ENTITY subsection1.1.3 SYSTEM "chapter1/section1/subsection3.xml">
<!ENTITY subsection1.1.4 SYSTEM "chapter1/section1/subsection4.xml">
<!ENTITY subsection1.1.5 SYSTEM "chapter1/section1/subsection5.xml">
<!ENTITY subsection1.1.6 SYSTEM "chapter1/section1/subsection6.xml">
<!ENTITY subsection1.1.7 SYSTEM "chapter1/section1/subsection7.xml">
<!ENTITY subsection1.1.8 SYSTEM "chapter1/section1/subsection8.xml">

Is there any way to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions