OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Using expat to translate tags..

[ Lists Home | Date Index | Thread Index ]
  • From: "Marcus Carr" <mrc@allette.com.au>
  • To: <xml-dev@ic.ac.uk>
  • Date: Wed, 9 Dec 1998 07:06:30 -0800

Tony wrote:

>I'm using expat along with the XML support in PHP 3.0.6
>(http://www.php.net) to do some machinations on some XML files I have.

Not being very familiar with Expat, this may overlook an obvious solution -
if so, apologies in advance.

>What I have is some XML like this...
><p stylename="heading 1" align="center" fontname="Arial" fontsize="72"
>bold="on" charset="256" color="1"><string>&tab;</string><string
>fontname="Arial" fontsize="72" bold="on" charset="256" color="1">MBBS STAGE
>1: &line;</string><string fontname="Arial" fontsize="72" bold="off"
>italic="on" charset="256" color="1">Basic Cell Biology</string></p>
>(this was created with rtf2xml from Omnimark)
>and want to be able to change the XML so that I get something like;
><heading_1>MBBS STAGE 1 - Basic Cell Biology</heading_1>   (ok, I'll
>*actually* end up replacing heading_1 with H1...)
>ie, I want to output a different tag which is dependant on the value of the
>'stylename' attribute.

Since you're using it for the first stage anyway, I would write another
OmniMark script to get the XML into the structure you desire. For the
record, Rick Geimer wrote rtf2xml, not OmniMark, and although you could use
any number of tools to carry out the next conversion stage, I'd bet money on
what I think Rick uses. :-)

Marcus Carr

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS