El Martes, 24 de Enero de 2006 17:12, Nico R. escribió: > Hi! > > Hmm ... no replies? Perhaps I should better post this to -dev where the > BLFS XML gurus live?
I'm not a guru but live here ;-) > > I'd like to create one XML file with the BLFS book in it, so I used the > > following command: > > $ xmllint --nonet --xinclude --postvalid index.xml > /tmp/all.xml > > > > This produces the XML file /tmp/all.xml with an internal subset > > containing the general entities and the ones from the internal subset of > > XIncluded files, but *not* the entities from internal subsets in files > > XIncluded from XIncluded files (e.g. postlfs/config/autofs.xml). Good catch. Not catched before due that I was not need until now to dump the full BLFS book and a plain "xmllint --nonet --xinclude --postvalid index.xml" work as expected. The internal subsets of entities never will be added to the global set on the dumped output. Xinclude work only with XML nodes, not with DTD's declarations. The problem is that xmllint is postvalidating the in-memory infoset tree, that have already loaded and resolved both global and local entities but, due how Xinclude must to work, dump only the global DTD's definitions generating an invalid file. Then, the bug is that local entities defined in Xincluded files should be allways replaced by their actual values in the output tree. But how could the Xinclude processor know if an entity was declared globally or locally? It can't. To fix this bug all entities found in Xincluded files must be replaced by their values in the output, and that, for the BLFS sources, is equivalent to tell to xmllint that must to replace all entities in the output using: $ xmllint --nonet --xinclude --noent --postvalid index.xml > /tmp/all.xml -- Manuel Canales Esparcia Usuario de LFS nº2886: http://www.linuxfromscratch.org LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com TLDP-ES: http://es.tldp.org -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page