[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Help needed to use ENTITY in docbook5 (convert from docbook4)
Hi, I don't quite understand the execution. In had once read (for docbook4) that the files included with xi:include should be built so that they are executable themselves. Is this correct? Based on the correspondence I have now implemented it as follows:
The main file looks like this (extract):
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book [ <!ENTITY % darktable_ent SYSTEM "../darktable.ent"> %darktable_ent; ]>
<book version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" status="final" xml:id="darkroom_chapter">
<!--- an so on -->
<xi:include href="" xmlns:xi="http://www.w3.org/2001/XInclude"/>
The included file looks like:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter [ <!ENTITY % darktable_ent SYSTEM "../darktable.ent"> %darktable_ent; ]>
<chapter version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" status="final" xml:id="overview_chapter">
<!--- an so on -->
Is this the correct way or do I have to change something?
Thanks in advance Pierre
Am Montag, 28. Mai 2018, 12:08:44 CEST schrieb Jirka Kosek: > On 25.5.2018 9:23, victory wrote: > > I think this is caused by this change: > > https://github.com/docbook/docbook.org/issues/17 > > Please note that there were not made change. The problem is that with > DocBook 4 people usually used external entities to break document into > several smaller files. If this approach is used entities defined in the > main file are inherited to files included via entity mechanism. > > For DocBook 5 XInclude is usually used for modularity. With XInclude > situation is different. Each xincluded file is parsed separately and > does not inherit entity declarations from the main file. So with > XInclude entity declarations has to be repeated at the beginning of each > file. > > But in fact this is not directly related to differences between DocBook > 4 and 5. You can use XInclude with DocBook 4 or external entities with > DocBook 5. > > But using entities for accented characters in 2018 seems really wrong. > Appropriate Unicode characters should be used directly in the files. > > Jirka
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]