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: Improving attribute extensibility


Hi Norm (and all other schema addicts),

I have been creating DocBook customization which have to add new
attributes to all elements. I recognized that currently common
attributes are defined by two patterns:

db.common.attributes =
   db.xml.id.attribute?
 & db.version.attribute?
 & db.xml.lang.attribute?
 & db.xml.base.attribute?
 & db.remap.attribute?
 & db.xreflabel.attribute?
 & db.revisionflag.attribute?
 & db.dir.attribute?
 & db.effectivity.attributes

db.common.idreq.attributes =
   db.xml.id.attribute
 & db.version.attribute?
 & db.xml.lang.attribute?
 & db.xml.base.attribute?
 & db.remap.attribute?
 & db.xreflabel.attribute?
 & db.revisionflag.attribute?
 & db.dir.attribute?
 & db.effectivity.attributes

This means that one have to extend two named patterns if new attributes
are to be everywhere, like:

db.common.attributes &= pattern.for.new.attributes
db.common.idreq.attributes &= pattern.for.new.attributes

What about introducing new named pattern for extensibility:

db.extension.attributes = empty

and adding it to db.common.attributes and db.common.idreq.attributes:

db.common.attributes =
   db.xml.id.attribute?
 & db.version.attribute?
 & db.xml.lang.attribute?
 & db.xml.base.attribute?
 & db.remap.attribute?
 & db.xreflabel.attribute?
 & db.revisionflag.attribute?
 & db.dir.attribute?
 & db.effectivity.attributes
 & db.extension.attributes

db.common.idreq.attributes =
   db.xml.id.attribute
 & db.version.attribute?
 & db.xml.lang.attribute?
 & db.xml.base.attribute?
 & db.remap.attribute?
 & db.xreflabel.attribute?
 & db.revisionflag.attribute?
 & db.dir.attribute?
 & db.effectivity.attributes
 & db.extension.attributes

Addition of new global attributes would be then simpler, just:

db.extension.attributes &= pattern.for.new.attributes

What do you think?

			Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO/JTC1/SC34 member
------------------------------------------------------------------
 Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.html

OpenPGP digital signature



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