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] Marks assignment for qandaentries



Hi Cameron,
There isn't a feature in DocBook to assign marks or points to a question, because DocBook wasn't really designed for courseware. But DocBook was designed to be customized and extended, in case you have specialized needs.
 
For example, almost all elements include an empty "local" parameter entity in the DTD for adding new attributes.  In your case, an attribute named "points" could be added to either the question element or the qandaentry element, which contains the question element.  For example:
 
<!DOCTYPE book SYSTEM "docbook.dtd" [
<!ENTITY % local.question.attrib "points CDATA #IMPLIED">
]>
 
When the parser loads the DTD, it reads this internal subset first, and uses this value of the parameter entity instead of the empty one in the DTD. With this change, you can add a points attribute to your question elements, and it will validate.
 
Putting the entity declaration in the internal subset of the DTD (in the XML file itself) is fine for a few documents, but if you have lots, you might consider customizing the external DTD.  See Norm Walsh's book DocBook: The Definitive Guide (online version) chapter 5 for more info on how to do that:
 
http://docbook.org/tdg/en/html/ch05.html
 
The DocBook XSL stylesheets won't know about the new attribute, though, so if you want the points to show in the output, you would need to customize the XSL template for question.
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Monday, October 30, 2006 5:49 PM
Subject: [docbook] Marks assignment for qandaentries

I'm new to Docbook, and want to use it for most of my University-level course documentation.

I've been looking through the specs, and I cannot find any way to assign marks/points to a question. Can anyone point me in the right direction?

Thanks.
-- 
• Cameron Kerr  •  ckerr@cs.otago.ac.nz •  •
• Telecommunications Teaching Fellow & SysAdmin •
•  http://humbledown.org/blog/ •  021 02 333 294 





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