Hello, I'm trying to include some external files in my Docbooks files, but have issues with daps or docbook. I've been following some tutorials/guides and everything I try it fails. Following are some try/errors based on some Docbook/Daps guides. Still can't find the way to include external files. Please help me with light to my knowledge darkness.
Some words are in polish, don't know why. I added in my opensuse leap 42.2 polish input keyboard but I don't expect that outputs are in polish too.
Hi, it's me again, Patricio.
Thanks for your reply, I have to say about it that:
Ok, will avoid entitites.
I've added in this way:
<glossary xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.1" xml:lang="es">
but still error.</glossary>
To your questions:
are inside same xml folder: MyDocs/xml/Glosario-Gestos.xml and MyDocs/xml/Main.....xml
Inside book as direct child: <book> <xinclude:......></xinclude:......></book>
No, will wait to openSUSE Leap 42.3 to reinstall my system (two weeks), hope it have the new version. Where can I try the latest anyway?
Nop, all are private repos :-/
Seems is a parser problem that needs a protocol like "http://..." or "file://" inside href ?
Thanks again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
are inside same xml folder: MyDocs/xml/Glosario-Gestos.xml and MyDocs/xml/Main.....xml
Ok, that's good.
Inside book as direct child: <book> <xinclude:......></xinclude:......></book>
Hmn, just a guess: it seems to me, you are missing a title element. This is mandatory. If your main file is not valid, the whole xinclude and postvalidation process will fail.
Try the following structure in your main file:
<bookxml:id="mybook"xml:lang="es"version="5.1"xmlns:xlink="http://www.w3.org/1999/xlink"xmlns:xi="http://www.w3.org/2001/XInclude"xmlns="http://docbook.org/ns/docbook"><title>YourTitle</title><!-- <subtitle>Optional subtitle</subtitle> --><info><!-- Possible optional meta information like author, copyright, date, legalnotice, ... etc. --></info><xi:includehref="Glosario-Gestos.xml"/></book>
No, will wait to openSUSE Leap 42.3 to reinstall my system (two weeks), hope it have the new version. Where can I try the latest anyway?
If you can't share your private text, maybe you can replace all text with "X"? This may still reveal the structure, but the original text is not readable anymore. If you like, you can sent me an archive and I can look at it.
View and moderate all "DAPS General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion, old (read-only)"
Hello, I'm trying to include some external files in my Docbooks files, but have issues with daps or docbook. I've been following some tutorials/guides and everything I try it fails. Following are some try/errors based on some Docbook/Daps guides. Still can't find the way to include external files. Please help me with light to my knowledge darkness.
Some words are in polish, don't know why. I added in my opensuse leap 42.2 polish input keyboard but I don't expect that outputs are in polish too.
Just a note aside: In this example https://opensuse.github.io/daps/doc/cha.daps.user.modular.html#ex.daps.ent.decl.separate.multi code have "<ENTITY:.." (1) while in descripción say explicit "(1) <!ENTITY....", what happen to "!" char ?
Thanks in advance
Hi Patricio,
thanks for your detailed report! Much appreciated.
Some comments though:
Glosario-Gestos.xmlis missing the DocBook5 namespace and a version attribute ( for example,version="5.1")I have also some questions:
xml/?xi:includeelement in example 2 appear? I mean, does it appear directly as a child element underbookor is it deeper nested?I've tried to confirm this and created a small project from scratch, used your names and the structure (as I could see it). Well, it works for me...
Good catch, this is a missing "!" char. I've committed the fix to https://github.com/openSUSE/daps/commit/8d7fc3775
Thanks!
View and moderate all "DAPS General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion, old (read-only)"
Hi, it's me again, Patricio.
Thanks for your reply, I have to say about it that:
<glossary xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.1" xml:lang="es">
but still error.</glossary>
To your questions:
Seems is a parser problem that needs a protocol like "http://..." or "file://" inside href ?
Thanks again.
Hi Patricio,
thanks for your answer.
Ok, that's good.
Hmn, just a guess: it seems to me, you are missing a
titleelement. This is mandatory. If your main file is not valid, the whole xinclude and postvalidation process will fail.Try the following structure in your main file:
Have you used https://software.opensuse.org/distributions/tumbleweed ?
Once installed, you can upgrade to the latest version with
zypper dup, see https://en.opensuse.org/SDB:System_upgradeIf you can't share your private text, maybe you can replace all text with "X"? This may still reveal the structure, but the original text is not readable anymore. If you like, you can sent me an archive and I can look at it.
To do so, I've written an obfuscate stylesheet which you can download from here:
https://github.com/openSUSE/daps/blob/develop/daps-xslt/contrib/obfuscate.xsl
To apply the obfuscate.xsl, use the stylesheet with the following shell commands:
After you've successfully created the tar archive, sent it to me (toms AT suse DOT de). This makes it a bit easier to find the problem.
No, the
hrefcan hold just a filename or a URL.Hope that helps.
Thanks,
Tom
Last edit: Thomas Schraitle 2017-07-14
View and moderate all "DAPS General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion, old (read-only)"
Hi, book have corresponding title tag too.
Data sent. Thanks for your support :)
After I've got the archive I could solve this. It has to do with an Unicode/UTF-8 character inside the filename.
I haven'd found the tool to blame, but for the time being, it is probably a good idea to stick to ASCII-only filenames.
Thanks Patricio for this bug report. Filed it as https://github.com/openSUSE/daps/issues/416
View and moderate all "DAPS General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion, old (read-only)"
Hi, thanks for your support. Changed file name and that work. This is a related issue: https://github.com/openSUSE/daps/issues/397
Thank you very much!.