OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Is it possible to include markup in a general entity?

Yes, you can have markup inside entities.  The problem in this case is that 
the elements inside your entity declarations are not in the docbook 
namespace.  You'll need to edit the declarations as follows:

<!ENTITY ac "<emphasis xmlns='http://docbook.org/ns/docbook'>administrative 

The namespace is not inherited from the root element of the importing 
document.  This is true of XIncludes as well.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Mike Broschinsky" <mbroschi@utah.gov>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, January 27, 2009 9:37 AM
Subject: [docbook-apps] Is it possible to include markup in a general 

Clearly, I am not as bright as I think; equally clearly, my Google skills 
are not what they ought to be as I cannot find the answer to this question.

I want to take advantage of general entities to minimize my typing, so I 
have been experimenting a bit. When I have an entity that contains just 
straight text, the entity expands just fine. When I have an entity that 
contains markup, e.g. <emphasis>administrative code</emphasis>, my attempt 
to create an fo file from my xml sources using xsltproc returns the 

Making portrait pages on USletter paper (8.5inx11in)
Element emphasis in namespace '' encountered in para, but no template 

I have no doubt missed something obvious, but can't seem to put my finger on 
it. So, *can* I have markup in a general entity that I wish to expand? 
Thanks for your help; don't laugh too hard. :)

I have the following DocBook document:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book [
<!ENTITY % manualent SYSTEM "manualentities.ent">
<book xmlns="http://docbook.org/ns/docbook";
<title>Rulewriting manual for Utah</title>

<para>Style guidelines for rules to be included in the &ac;</para>

    href="part-style.xml" />


I have the associate entities file, manualentities.ent:

<?xml version="1.0" encoding="utf-8" ?>
<!ENTITY ac "<emphasis>administrative code</emphasis>">
<!ENTITY uc "Utah Code">

I use xsltproc with the following command line to create an fo file:

xsltproc --xinclude --output manual.xml.fo ..\customxsl\customxsl-fo.xsl 

My customxsl-fo.xsl file contains:

<?xml version="1.0"?>

<!-- Import stock DocBook stylesheets -->
<xsl:import href="../dbxsl/fo/docbook.xsl"/>

<!-- Set XEP extensions -->
<xsl:param name="xep.extensions" select="1" />

<!-- Customizations -->
<!-- Inner and outer page margins -->
<xsl:param name="page.margin.inner">1.5in</xsl:param>
<xsl:param name="page.margin.outer">1in</xsl:param>

<!-- Section and subsection headings -->
<xsl:param name="body.start.indent">0pc</xsl:param>


Mike Broschinsky
Administrative Code Editor
Utah State Division of Administrative Rules

Because of the governor's "Working 4 Utah" initiative, office hours for the 
Division of Administrative Rules are 7 a.m. to 6 p.m., Monday through 
Thursday. The Division is closed on Friday.

To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]