[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: small docbook customization layer for business letters
Hello:
Below please find my first cut at a RELAXNG schema that provides an
extremely
thin customization layer on top of Docbook 5.0b1 for business letters.
I hope you might find it interesting. Any and all comments welcome.
I myself was quite pleased with how easy it is to create such
Docbook-based schemata (less than 50 LOC)!
All my custom elements are in the "l:" namespace, and the docbook
references start with "db."
My biggest issue right now is trying to figure out if there is a RELAXNG
validator out there
with XML catalog support, so I can keep my schema files separate from
thirdparty ones....
--Craeg
<grammar>
<include href="docbook.rng">
<start>
<element name="l:letter">
<a:documentation>A business letter</a:documentation>
<ref name="db._info"/>
<element name="l:sender">
<a:documentation>The person sending the letter</a:documentation>
<ref name="db.personname"/>
<ref name="db.affiliation"/>
<ref name="db.address"/>
</element>
<element name="l:addressee">
<a:documentation>The party to whom the letter is
addressed</a:documentation>
<choice>
<group>
<ref name="db.personname"/>
<ref name="db.affiliation"/>
</group>
<ref name="db.orgname"/>
</choice>
<ref name="db.address"/>
</element>
<optional>
<element name="l:regarding">
<a:documentation>A short summary of what this letter is
about, usually printed in the form of "RE: blah"</a:documentation>
<oneOrMore><ref name="db.all.blocks"/></oneOrMore>
</element>
</optional>
<element name="l:salutation"><text/></element>
<element name="l:body">
<a:documentation>The main body of the letter</a:documentation>
<oneOrMore><ref name="db.all.blocks"/></oneOrMore>
</element>
<element name="l:closing"><text/></element>
<element name="l:signature">
<ref name="db.personname"/>
<optional><ref name="db.affiliation"/></optional>
</element>
</element>
</start>
</include>
</grammar>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]