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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] v5 extension elements


Dave Pawson wrote:
> Jirka Kosek wrote:
>> Dave Pawson wrote:
>>> I found it easy enough to create a reduced docbook set.
>>>
>>> wondering about extending it.
>>>
>>> I need to add an element into the basic inlines?
> 
>>>
>>> Is there any better way of doing this please?
>>
>>  <define name="db.ubiq.inlines" combine="choice">
>>   <choice>
>>     <ref name="shLft"/>
>>     <ref name='shRt'/>
>>   </choice>
>> </define>
>>
> 
> In an external file Jirka.. then include the main db file?
> 
> Sounds 'smarter' than my way!


Trying the same, with a block level element and I'm getting
all sorts of trouble.

My customization is

<include href="/sgml/docbook/v5/docbookxi.rng">
   <define name="db.para.blocks" combine="interleave">
     <ref name="Fragment"/>
   </define>
</include>




<define name="Fragment">
   <element name="fragment" ns="http://nwalsh.com/xmlns/litprog/fragment";>
     <zeroOrMore>
       <attribute>
	<anyName/>
       </attribute>
     </zeroOrMore>
     <ref name="foreign-elements"/>
   </element>
</define>

<define name="foreign-elements">
   <zeroOrMore>
     <element>
       <anyName>
	
       </anyName>
       <zeroOrMore>
	<attribute>
	<anyName/>
	</attribute>
       </zeroOrMore>
       <text/>
     </element>
   </zeroOrMore>
</define>


I.e. I want an 'any element' option to the para level block elements.

1. If I try this jing tells me

/files/litprog/litprog.rng:45:14: error: conflicting ID-types for 
attribute "linkend" of element "msginfo" from namespace 
"http://docbook.org/ns/docbook";

which I'm led to believe is the RELAX NG DTD Compatibility issue.
so I try
$ jing  -i litprog.rng litprog.xweb

and I get

/files/litprog/litprog.xweb:36:11: error: element "para" from namespace 
"http://docbook.org/ns/docbook"; not allowed in this context
/files/litprog/litprog.xweb:42:9: error: element "para" from namespace 
"http://docbook.org/ns/docbook"; not allowed in this context
/files/litprog/litprog.xweb:44:9: error: element "para" from namespace 
"http://docbook.org/ns/docbook"; not allowed in this context
/files/litprog/litprog.xweb:56:9: error: element "para" from namespace 
"http://docbook.org/ns/docbook"; not allowed in this context
/files/litprog/litprog.xweb:59:9: error: element "para" from namespace 
"http://docbook.org/ns/docbook"; not allowed in this context
/files/litprog/litprog.xweb:62:29: error: element "element" from 
namespace "http://relaxng.org/ns/structure/1.0"; not allowed in this context


I.e. I can't have any para elements within a section?

I don't understand how the two are related.

Any suggestions please - other than forget the customization,
which is where I am now.

TIA





-- 
Dave Pawson
XSLT, XSL-FO and Docbook FAQ
http://www.dpawson.co.uk



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