asciidoctor / asciidoctor-fopub

A portable DocBook-to-PDF build command that wraps DocBook XSL and Apache FOP
MIT License
113 stars 37 forks source link

Upgrade docbook DTD #67

Closed getreu closed 6 years ago

getreu commented 8 years ago

I found the following 4.5 references in build-gradle:

task downloadDocbookXml(type: Download) {                                        
  url = 'http://maven-us.nuxeo.org/nexus/content/repositories/public/docbook/docbook-xml/4.5/docbook-xml-4.5.jar'
  destinationFile = file("$buildDir/docbook-xml-4.5.jar")                        
}                                                                                

task extractDocbookXml(type: Copy, dependsOn: downloadDocbookXml) {              
  def archive = file("$buildDir/docbook-xml-4.5.jar")                            
  def outputDir = file("$buildDir/unpacked/docbook-dtds")                        
  from(zipTree(archive))                                                         
  into outputDir                                                                 
}                                                                                

// put the DocBook DTDs into the dist                                            
applicationDistribution.from(extractDocbookXml) {                                
  into "docbook/xml-dtd-4.5"                                                     
}                                                                                

http://www.sagehill.net/docbookxsl/Db5Tools.html

RelaxNG schema. For the first time, the DocBook standard is defined using the RelaxNG schema language. RelaxNG is more powerful than DTDs, and easier to customize than XML Schemas. RelaxNG permits an element in different contexts to have different content models. For convenience (or necessity in some cases), versions of DocBook 5 are also available in DTD and XML Schema form, but those are considered non-normative and do not match all the features of the RelaxNG version.

mojavelinux commented 6 years ago

fopub works with both DocBook 4.5 and DocBook 5.0 files. The reason the DTDs are there is so that fopub can convert DocBook 4.5 files without error.