This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Namespace and DocBook XML


>Ok, maybee I wasn't quite clear.
>
>Let us aasume that the element "myelement" may contain #PCDATA and/or
>DocBook markup. I know, I can't inherit the DocBook DTD, and I have no
>intension of copying the wholeDocBook DTD into my DTD.
>

You need to use a mixed content declaration that references the 
various top-level DocBook elements you might contain; e.g.

<!ELEMENT myelement (#PCDATA | book | article)*>

Then import the DocBook DTD using a parameter entity reference. e.g.

<!ENTITY % docbook SYSTEM "docbookx.dtd"?
%docbook;

This presumes there are no name conflicts between your markup and 
DocBook's. If there are you'll need to add namespace prefixes to your 
markup.

Details are available in the XML Bible and many other books.

>What I basicly wan't to to is:
>
>Define myelement to contain #PCDATA. And then basically ignore the
>content of that element.  I was thinking, that mybee I could use
>namespaces to solve it, something like
>

Can't do that. XML is XML, not PCDATA.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|              http://www.ibiblio.org/xml/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/     |
+----------------------------------+---------------------------------+

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]