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?


And of course, this fixes the problem.

So, really, Bob, is there anything that you don't know? ;)

The follow up question is, "Where would I have learned this information?" Is this explicitly stated somewhere, or should I have been able to derive it from other related statements, either in TDG or your excellent book?

Mike

>>> "Bob Stayton" <bobs@sagehill.net> 1/27/2009 2:47 PM >>>
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 
code</emphasis>">

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

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net 


----- 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 
entity?


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 
following:

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

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">
%manualent;
]>
<book xmlns="http://docbook.org/ns/docbook";
      xml:lang="en">
<info>
<title>Rulewriting manual for Utah</title>

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

<xi:include
    xmlns:xi="http://www.w3.org/2001/XInclude";
    href="part-style.xml" />

</book>

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 
manual.xml


My customxsl-fo.xsl file contains:

<?xml version="1.0"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:fo="http://www.w3.org/1999/XSL/Format";
    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>

</xsl:stylesheet>


----------------------------
Mike Broschinsky
Administrative Code Editor
Utah State Division of Administrative Rules
801-538-3003
mbroschi@utah.gov 

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]