Lists Home |
Date Index |
- From: "John E. Simpson" <email@example.com>
- To: firstname.lastname@example.org
- Date: Sat, 23 Jan 1999 11:00:45 -0500
At 03:12 PM 1/23/99 +0000, Tony McDonald wrote:
><studyguide title='Organisation of Tissues'>
><section title='Core Content' sg_title='Organisation of Tissues'> *1*
>I'm using an Expat enabled parser to scan the resultant documents and
>(try) to do the translations.
>...I would like the <section>..</section> tag to be replaced by a <h2
>class="section">Core Content: Organisation of Tissues</h2> construct,
>but using expat, I end up with the closing </h2> tag at the line
>marked *2* above.
I think expat is doing exactly what you asked it to do: turning all of the
section element's content into <h2>. One way to fix it might be to turn the
title and sg_title attributes into full-blown child elements of the section
element, and enclose them in something like a titleinfo wrapper to which
you can apply your desired class attribute. Something like this:
<sg_title>Organisation of Tissues</sg_title>
This seems to be a good illustration of one argument in favor of using
elements vs. attributes: when you want the content to be easily displayed.
Will be interested to see others' replies, if any.
John E. Simpson
Just XML - Now available from Prentice-Hall
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)