Re: customizing docbook-ng

Norman Walsh <[email protected]> Thu, 19 Aug 2004 05:57:43 -0400
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
/ "Bruce D'Arcus" <[email protected]> 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 <[email protected]> | 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

_______________________________________________
relaxng-user mailing list
[email protected]
http://relaxng.org/mailman/listinfo/relaxng-user
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBBJHmXOyltUcwYWjsRArWiAJ9NZ8yFwj3vLc/Rz6lHItWKN84OlwCgnNtb
CLbjP86RD0cJAdccd+ldtnY=
=yTWJ
-----END PGP SIGNATURE-----