By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,203 Members | 1,633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,203 IT Pros & Developers. It's quick & easy.

Modularization using modularized xhtml

P: n/a
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="http://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.dtd">

<!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
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.