[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Internal entities
You are right, entities in nested XIncludes are not making it to the top level. I checked the Bugzilla database for libxml2, and it appears this bug was fixed in libxml2 version 2.6.8. You might try that. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Leticia Thorell" <LeticiaT@invera.com> To: "'Bob Stayton'" <bobs@sagehill.net>; <docbook-apps@lists.oasis-open.org> Sent: Monday, May 03, 2004 10:20 AM Subject: RE: [docbook-apps] Internal entities > I tried with xmllint and it works like you said. > But I forgot to include the following in my examples: > > <!DOCTYPE book PUBLIC "-//INVERA//DTD DocBook XML V4.2-Extension//EN" > "http://our.local.docbook.dtd" > > <book id="documentation-guide" lang="en"> > <title>Product & User Documentation Guide</title> > <subtitle>OurDocs Project</subtitle> > <xi:include href="our-docbook/our-docbook.xml" > xmlns:xi="http://www.w3.org/2003/XInclude"/> > <index/> > </book> > > So, just to recap: > 1) I have a chapter, our-docbook.xml, that contains the xinclude for the > article (where the entities are declared). > > 2) Then I have the above book that xincludes the chapter. > > If I tried xmllint on my chapter, it works. On the book, it does not. > Here's the dtd customization: > <!ENTITY % dbhier.redecl2.module "INCLUDE"> > <!ENTITY % rdbhier2 > ' > <!ENTITY % bookcomponent.content > "((%divcomponent.mix;)+, > > (sect1*|(%refentry.class;)*|simplesect*|(%section.class;)*|(article) > * )) > > |(sect1+|(%refentry.class;)+|simplesect+|(%section.class;)+)"> > ' > > > > Thanks. > > -----Original Message----- > From: Bob Stayton [mailto:bobs@sagehill.net] > Sent: Friday, April 30, 2004 12:12 PM > To: Leticia Thorell; docbook-apps@lists.oasis-open.org > Subject: Re: [docbook-apps] Internal entities > > > OK, so it wasn't the version. 8^) > > When I run xmllint --xinclude on your chapter file, I get output like this: > > <?xml version="1.0"?> > <!DOCTYPE chapter PUBLIC "-//INVERA//DTD DocBook XML V4.2-Extension//EN" > "../docbook42/docbookx.dtd" [ > <!ENTITY DG "&DISTRO; Documentation Guide"> > <!ENTITY DISTRO "Our DocBook"> > ]> > <chapter id="our-docbook"> > <title>OurDocBook Document Type</title> > <para>OurDocbook is a an extension of the DocBook DTD. The following > articles describe document > tags and structure of OurDocBook document type.</para> > <article id="ch-xml-tags"> > <title>OurDocBook Tags</title> > <para>Some text with the &DG; entity defined.</para> > </article> > </chapter> > > [note that I replaced your DTD reference with one to the docbook DTD so that > a DTD is found, but I'm not validating with it] > > You can see that the assembled output includes the entity declarations, so > that when the file is processed by the stylesheets the entities will be > available. Can you test with xmllint? > > My only other idea is that your DTD isn't being found during processing, but > you should see an error message about that. Do you get error messages about > unresolved entities? > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Leticia Thorell" <LeticiaT@invera.com> > To: "'Bob Stayton'" <bobs@sagehill.net>; <docbook-apps@lists.oasis-open.org> > Sent: Friday, April 30, 2004 8:55 AM > Subject: RE: [docbook-apps] Internal entities > > > I'm using: > $ xsltproc --version > Using libxml 20604, libxslt 10102 and libexslt 802 > xsltproc was compiled against libxml 20604, libxslt 10102 and libexslt 802 > libxslt 10102 was compiled against libxml 20604 > libexslt 802 was compiled against libxml 20604 > > And yes, you're correct, we're including articles in chapters in our > customization. > > -----Original Message----- > From: Bob Stayton [mailto:bobs@sagehill.net] > Sent: Friday, April 30, 2004 11:44 AM > To: Leticia Thorell; docbook-apps@lists.oasis-open.org > Subject: Re: [docbook-apps] Internal entities > > > Hi, > Your sample files work ok for me. When I process your chapter file that > XIncludes the article, the entities are properly expanded in the output. > > What version of xsltproc are you using? I'm using: > > $ xsltproc --version > Using libxml 20605, libxslt 10102 and libexslt 802 > xsltproc was compiled against libxml 20604, libxslt 10102 and libexslt 802 > libxslt 10102 was compiled against libxml 20604 > libexslt 802 was compiled against libxml 20604 > > BTW, I'm presuming your DTD customization expands the chapter content model > to include article, since normally article is only permitted in book and > part elements. > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Leticia Thorell" <LeticiaT@invera.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Friday, April 30, 2004 6:31 AM > Subject: [docbook-apps] Internal entities > > > Hi > > When generating standalone articles, the internal entities I have declared > worked fine. However, for the book (with xinclude), they don't. I get a > blank... > > Here's what I have: > > Article: > > <!DOCTYPE article PUBLIC "-//INVERA//DTD DocBook XML V4.2-Extension//EN" > "http://our.local.docbook.dtd" [ > <!ENTITY DISTRO "Our DocBook"> > <!ENTITY DG "&DISTRO; Documentation Guide"> > ]> > <article id="ch-xml-tags"> > <title>OurDocBook Tags</title> > <articleinfo> > <revhistory> > .... > </article> > > Chapter: > > <!DOCTYPE chapter PUBLIC "-//INVERA//DTD DocBook XML V4.2-Extension//EN" > "http://our.local.docbook.dtd"> > <chapter id="our-docbook"> > <title>OurDocBook Document Type</title> > <para>OurDocbook is a an extension of the DocBook DTD. The following > articles describe document > tags and structure of OurDocBook document type.</para> > <xi:include href="tags-reference.xml" > xmlns:xi="http://www.w3.org/2003/XInclude"/> > </chapter> > > To generate standalone articles: > xsltproc --output $@ $(XSLARTICLES) $< > > To generate the book: > xsltproc --xinclude --param base.dir "'$(dir $@)'" --param home.dir > "'$(HOME)'" $(XSLBOOKS) $< > > Any ideas? > > Thanks. > > L.T. > > > **************************************************************************** > > This e-mail may be privileged and/or confidential, and the sender does not > waive any related rights and obligations. Any distribution, use or copying > of this e-mail or the information it contains by other than an intended > recipient is unauthorized. If you received this e-mail in error, please > advise me (by return e-mail or otherwise) immediately. > > Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux > droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou > copie de ce message ou des renseignements qu'il contient par une personne > autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez > ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de > courriel ou par un autre moyen. > > To unsubscribe from this list, send a post to > docbook-apps-unsubscribe@lists.oasis-open.org, or visit > http://www.oasis-open.org/mlmanage/. > > > > > > **************************************************************************** > > This e-mail may be privileged and/or confidential, and the sender does not > waive any related rights and obligations. Any distribution, use or copying > of this e-mail or the information it contains by other than an intended > recipient is unauthorized. If you received this e-mail in error, please > advise me (by return e-mail or otherwise) immediately. > > Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux > droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou > copie de ce message ou des renseignements qu'il contient par une personne > autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez > ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de > courriel ou par un autre moyen. > > > > > **************************************************************************** > > This e-mail may be privileged and/or confidential, and the sender does not > waive any related rights and obligations. Any distribution, use or copying > of this e-mail or the information it contains by other than an intended > recipient is unauthorized. If you received this e-mail in error, please > advise me (by return e-mail or otherwise) immediately. > > Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux > droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou > copie de ce message ou des renseignements qu'il contient par une personne > autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez > ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de > courriel ou par un autre moyen. > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]