Gregorio, You might look at adding --nonet and --novalid to your xsltproc command line if they are not there already. You didn't mention the command line options that you are invoking XSLTPROC with. Regards, Dean Nelson In a message dated 2/9/2012 10:17:57 A.M. Pacific Standard Time, gpev...@aol.com writes:
Bob: Thank you very kindly for the reply. I should have included the entire file in the example given, it does indeed have a dtd, exactly as shown in your book: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> <chapter> <chapterinfo> <date id="DateVer">January 2012 Version 1.2.3</date> <releaseinfo id="RelInfo">12-002009-16.c</releaseinfo> <copyright id="Copyright"> <year>2012. All rights reserved</year> </copyright> </chapterinfo>... However there is a peculiarity when running ANY file through xsltproc, it complains about every file, included or omitted: Version.xml:3: warning: failed to load external entity "_http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd_ (http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd) " "_http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd_ (http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd) "> which I honestly thought was just some noise as this usually does not interfere with the expected processing, until now. I suspect that would cause the issue. How can I get past that? Migrating to docbook 5 is probably not an option at the moment. Than you very much, not only for your reply, but for the great work you do supporting the community and in writing the Complete Guide! /Gregorio -----Original Message----- From: Bob Stayton <b...@sagehill.net> To: docbook-apps <docbook-apps@lists.oasis-open.org>; Gregorio Pevaco <gpev...@aol.com> Sent: Thu, Feb 9, 2012 12:24 pm Subject: Re: [docbook-apps] xinclude xpointer not including with id In this section of my book: _http://www.sagehill.net/docbookxsl/ModularDoc.html#XincludeSelect_ (http://www.sagehill.net/docbookxsl/ModularDoc.html#XincludeSelect) I address that problem with this sentence: "For selections based on id, the included document must have a DOCTYPE declaration that correctly points to the DocBook DTD. It is the DTD that declares that id attributes are of the ID type (the name id is not sufficient). If the file does not have the DOCTYPE or if the DTD cannot be opened, then such references will not resolve." So does Version.xml have a DOCTYPE declaration? Looking at my own sentence, I have to think: what about DocBook 5 which does not use a DOCTYPE? No problem. DocBook 5 files use xml:id, which is predefined as of type ID. Bob Stayton Sagehill Enterprises _bobs@sagehill.net_ (mailto:b...@sagehill.net) ----- Original Message ----- From: Gregorio Pevaco To: _docbook-apps@lists.oasis-open.org_ (mailto:docbook-apps@lists.oasis-open.org) Sent: Thursday, February 09, 2012 9:12 AM Subject: [docbook-apps] xinclude xpointer not including with id Some background I am using xsltproc to process modular documents to pdf. I have a file where I just want the one element included. It is not getting included and I am getting error messages, like: element include: XInclude error : could not load Version.xml I would think it would be a xsltproc issue, but I am following the examples in the documentation and it is not working like that... so perhaps there is something obvious here I am overlooking. so file Version.xml contains : <chapter> <chapterinfo> <date id="DateVer">January 2012 Version 1.2.3</date> <releaseinfo id="RelInfo">12-002009-16.c</releaseinfo> <copyright id="Copyright"> <year>2012. All rights reserved</year> </copyright> </chapterinfo>... In my file Book.xml I am tring to include the date info... <!--Original xinclude should have worked per example in chapter 23--> <!--xi:include href="Version.xml" xpointer="DateVer" xmlns:xi="_http://www.w3.org/2001/XInclude_ (http://www.w3.org/2001/XInclude) " / --> <!--according to doc this way should also too, but does not--> <xi:include href="Version.xml" xpointer="xpointer(id('DateVer'))" xmlns:xi="_http://www.w3.org/2001/XInclude_ (http://www.w3.org/2001/XInclude) " /> I have also tried : <!--xi:include href="Version.xml" xpointer="element(DateVer)" xmlns:xi="_http://www.w3.org/2003/XInclude_ (http://www.w3.org/2003/XInclude) " / --> and <!--xi:include href="Version.xml" xpointer="element(date)" xmlns:xi="_http://www.w3.org/2003/XInclude_ (http://www.w3.org/2003/XInclude) " / --> and none of these work, I am only interested in including the content of the <date> element from the Version.xml file. Now were I to do, this, <xi:include href="Version.xml" xpointer="element(/1)" xmlns:xi="_http://www.w3.org/2001/XInclude_ (http://www.w3.org/2001/XInclude) " /> then I get the entire contents from the Version.xml, which is not what I am interested in. Is there something that I am missing here? Why is this not working as indicated? Any suggestions? Thanks, /Gregorio