[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Cannot use entity (reference to file) in parameter file - DocBook 5
Hello all, Consider the following DocBook 5 files: test.xml ======== <?xml version="1.0" ?> <!DOCTYPE book [ <!ENTITY % testent SYSTEM "test.ent"> %testent; ]> <book xmlns="http://docbook.org/ns/docbook" version="5.0"> <info> <title>My First Book</title> <subtitle><orgname>&company;</orgname></subtitle> <author> <personname> <firstname>John</firstname><surname>Brown</surname> </personname> </author> <copyright> <year>2008</year><holder>&company;</holder> </copyright> </info> &test1; <!-- &test1 = test1.xml, which contains the text below <chapter><title>Testing 1, 2, 3 ...</title> <para>OK</para> </chapter> --> </book> test.ent ======== <!ENTITY company "Test Corporation"> <!ENTITY test1 SYSTEM "test1.xml"> test1.xml ========= <chapter><title>Testing 1, 2, 3 ...</title> <para>OK</para> </chapter> When I run 'xmllint --noout --relaxng /path/to/docbook.rng test.xml', it returns: test.xml:1: element chapter: Relax-NG validity error : Did not expect element chapter there test.xml:1: element chapter: Relax-NG validity error : Element book failed to validate content test.xml fails to validate If I comment out "&test1;" and uncomment the chapter definition, then test.xml validates. What am I doing wrong?
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]