[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] XHTML usage
Le 2005-02-01 19:01 (mardi), Tristan Fiedler a écrit / On 2005-02-01 19:01 (mardi), Tristan Fiedler wrote : > > I am setting up an online book using DocBook XML. To create a wrapper > website for the chapters, I was initially using "vanilla" html, but > have migrated to xhtml. > This is a good thing! Well most of us want a full 100% XML chain now. > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> > > 1. Does a user friendly website exist which shows allowed > nesting/parents/children for this xhtml? > I'm looking for something similar to : > http://www.docbook.org/tdg5/en/html/docbook.html > Not that I know of. I would recommend you XML aware editors, that know of the 3 different XHTML DTDs, so that they could contextually prompt you what elements are allowed. nXML mode + GNU Emacs is such an editor, but you may not call it user friendly cf. http://www.thaiopensource.com/nxml-mode/ > Currently I'm using : > http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Transitional > Actually XHTML 1.0 is "A Reformulation of HTML 4 in XML 1.0" so that all the nesting/parents/children that you will have in XHTML 1.0 are those that you will find in HTML 4 (what you are calling "vanilla" html). So if you have software or books that you were using to create valid HTML, you can use all the information they have about nesting/parents/children. There are differences with HTML 4 that can be found at http://www.w3.org/TR/xhtml1/#diffs Those are important and you should be aware of them, but they are not related to nesting/parents/children. > 2. How can I properly nest an <h2> within an <a>? > > allowed: <a name="chapterlist"><big>My Text</big></a> > disallowed : <a name="chapterlist"><h2>My Text</h2></a> > > You should rather use something like: <h2 id="chapterlist">My Text</h2> and link to it like: <a href="#chapterlist">Go to chapter list</a> cf. "The elements with 'id' and 'name' attributes" http://www.w3.org/TR/xhtml1/#h-4.10 Regards, -- Marc-Aurèle DARCHE <http://www.cynode.org/> AFUL <http://www.aful.org/> Association Francophone des Utilisateurs de Linux/Logiciels Libres French speaking Linux and Libre Software Users' Association
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]