[relaxng-user] Re: customizing docbook-ng
Norman Walsh
ndw at nwalsh.com
Thu Aug 19 09:58:14 ICT 2004
/ "Bruce D'Arcus" <bdarcus at fastmail.fm> was heard to say:
| What am I doing wrong here with the db.quote customization that is
| making nxml tell me it's invalid? I have the same issue with
| bibliography, where I can get tag-completion on the element, but then
| it's flagged as invalid.
| Bruce
|
| namespace db = "http://www.docbook.org/docbook-ng"
db = "http://docbook.org/docbook-ng"
No "www." on the front. I think that's most of it. I also got some
weirdness with competing "*" elements, that I fixed like this:
| default namespace = "http://www.docbook.org/docbook-ng"
| include "mods.rnc"
{
extensionSchema = db._any
}
| include "docbook-ng.rnc" {
db._any = element * - (db:*|mods:*) { db._any.attribute*, (text, db._any)* }
| # remove all the main software/technology related definitions
| db.domain.inlines = notAllowed
| db.product.inlines = notAllowed
| db.technical.blocks = notAllowed
| db.verbatim.blocks = notAllowed
| db.synopsis.blocks = notAllowed
| # add a new element to quote
| db.quote = element quote { db.quote.attlist, (db.all.inlines
| | hb.nonquote)* }
| # add mods to bibliography element
| db.bibliography = element bibliography {
| db.bibliography.attlist,
| db.bibliography.info,
| db.all.blocks*,
| (db.bibliodiv+ | (ModsSchema | db.biblioentry |
| db.bibliomixed)+)
| }
| }
| # nonquote pattern allows for semantic rendering of split quotes like:
| # "The world," the guy said, "is flat."
| hb.nonquote = element nq { empty }
Be seeing you,
norm
--
Norman Walsh <ndw at nwalsh.com> | Birds are taken with pipes that imitate
http://nwalsh.com/ | their own voices, and men with those
| sayings that are most agreeable to
| their own opinions.--Samuel Butler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://relaxng.org/pipermail/relaxng-user/attachments/20040819/5c8908a7/attachment.bin
More information about the relaxng-user
mailing list