Modularization using modularized xhtml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Rohleder

    #1

    Modularization using modularized xhtml

    Hi,

    I have a few simple questions in order to use modularized xhtml and
    getting it to work.

    A simple example may make this obviouse:

    Lets say we want to create a simple xml-file to reflect a
    faq-structure.

    For example:

    --------------------------------------------
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE faqs SYSTEM "faqs.dtd">

    <xmlns:xhtml="h ttp://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <faqs>
    <faq>
    <question>
    <xhtml:p>
    How to get this thing to work?
    </xhtml:p>
    </question>

    <answer>
    <xhtml:p>
    ..put the files into your home-directory and...
    </xhtml:p>
    </answer>
    </faq>
    </faqs>
    -------------------------------------------

    What I want to do is to use a subset of xhtml-tags(from the text- and
    list-Module) inside the question- and answer-tags.

    Having taken a look at the paper
    http://www.w3.org/TR/xhtml-modularization/
    and having stored the "xhtml11-list-1.mod"- and
    "xhtml11-text-1.mod"-Modules in the current directory a DTD like the
    following one seems to be appropriate:

    ----------------------------------------------------
    <!ENTITY xhtml.mod PUBLIC "-//W3C/DTD XHTML 1.1//EN" "xhtml11.dt d">

    <!ENTITY % XHTML.ns "http://www.w3.org/1999/xhtml" >


    <!ENTITY % xhtml-text.module "INCLUDE" >
    <![%xhtml-text.module;[
    <!ENTITY % xhtml-text.mod
    PUBLIC "-//W3C//ELEMENTS XHTML 1.1 Text 1.0//EN"
    "xhtml11-text-1.mod" >
    %xhtml-text.mod;]]>


    <!ENTITY % xhtml-list.module "INCLUDE" >
    <![%xhtml-list.module;[
    <!ENTITY % xhtml-list.mod
    PUBLIC "-//W3C//ELEMENTS XHTML 1.1 Lists 1.0//EN"
    "xhtml11-list-1.mod" >
    %xhtml-list.mod;]]>


    <!ELEMENT faqs (faq)*>

    <!ELEMENT faq (question, answer)>

    <!ELEMENT question (#PCDATA | %xhtml-text.mod; | %xhtml-list.mod;)>
    <!ELEMENT answer (#PCDATA | %xhtml-text.mod; | %xhtml-list.mod;)>
    -----------------------------------------------------

    But this xml-file doesn't validate against this DTD.

    Does anybody have a simple self made DTD- and XML-File which itsself
    makes use of one or more xhtml-Modules which validates?

    Thanks in advance

    Peter Rohleder
Working...