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] Problem with notes


Hi Kate,
In April 2008 the DocBook Technical Committee recognized that the DocBook 5.0 list of root elements is too short for modular documentation setups.  So in a future version 5.1 the list of root elements will expand to include all elements that can contain an info element.  That would include block elements.
 
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Thursday, June 18, 2009 9:04 AM
Subject: Re: [docbook] Problem with notes


Thank you George and Scott!

Is there a reason why the note (and others such as legalnotice, and variablelist) element is not included in the start pattern?

For content reuse, it is useful to be able to create files that can contain such smaller block elements as their roots.

Thanks again,
Kate



George Cristian Bina <george@oxygenxml.com>

06/18/2009 03:11 AM

To
Kate.Wringe@sybase.com
cc
docbook@lists.oasis-open.org
Subject
Re: [docbook] Problem with notes





Hi Kate,

RelaxNG has a start pattern that points to the elements that can be root
elements. By default the DocBook 5 schema does not include note in the
possible root elements.

You can create a schema that includes the DocBook schema and adds a
choice to the start pattern to add note as root element, like below:

<?xml version="1.0" encoding="UTF-8"?>
<grammar
  xmlns="http://relaxng.org/ns/structure/1.0"
  xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <include
href="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng"/>
    <start combine="choice">
      <ref name="db.note"/>
    </start>
</grammar>

Then you can refer to this schema from your document, in my case it is
named test.rng and it is in the same folder with the document:

<?oxygen RNGSchema="test.rng" type="xml"?>
<note xmlns="http://docbook.org/ns/docbook" version="5.0">
  <title>Separately licensed component required</title>
  <para>ECC encryption and FIPS-certified encryption require a separate
license. All strong encryption technologies are subject to export
regulations.</para>
  <para>See <olink targetdoc="firstguide"
targetptr="aboutasa-s-3623168">Separately licensed
components</olink>.</para>
</note>

Alternatively you can edit the DocBook5 document type in oXygen to point
to such a schema to get the association automatically without putting it
in the instance documents.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Kate.Wringe@sybase.com wrote:
>
> I'm trying to create a DocBook 5 RNG file that has a note element as its
> root. However, I keep getting the following error in oXygen:
>
> /E[oNVDL] element "note" from namespace "http://docbook.org/ns/docbook"
> not allowed in this context./
>
> Any ideas about what I'm doing wrong?
>
> Thank you,
> Kate
>
> The following is the xml that I'm using:
>
> /<note xmlns="http://docbook.org/ns/docbook" version="5.0">/
> / <title>Separately licensed component required</title>/
> / <para>ECC encryption and FIPS-certified encryption require a separate
> license. All strong encryption technologies are subject to export
> regulations.</para>/
> / <para>See <olink targetdoc="firstguide"
> targetptr="aboutasa-s-3623168">Separately licensed
> components</olink>.</para>/
> /</note>/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org





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