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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Converting XML

[ Lists Home | Date Index | Thread Index ]

>On Dec 28, 2004, at 3:57 PM, tedd wrote:
>
>>What's the easiest way to go from:
>>
>>     <booktitle>Understanding XML</booktitle>
>>
>>and convert it to:
>>
>>      <em class="booktitle">Understanding XML</em>
>>
>>Any ideas?
>
>Learn XSLT.  You'd just write a template like:
>
><xsl:template match="booktitle">
>   <em class="booktitle">
>     <xsl:apply-templates/>
>   </em>
></xsl:template>
>
>Bruce

and

>This is a simplistic example but it will work.  I assume
>there is more to your requirement than the element
>'booktitle'.
>
>Good luck!
>
>XSLT:
><?xml version='1.0' encoding='ISO-8859-1'?>
>
><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>                 version="1.0">
>
><xsl:template match="booktitle">
>   <em class="booktitle">
>      <xsl:apply-templates/>
>   </em>
></xsl:template>
>
</xsl:stylesheet>

Bruce and Betty:

Yeah, I figured that someone was gong to tell me that. I just didn't 
want to be forced into learning yet another acronym. As it is, my 
brain looks like my grand-daughter's half-eaten alphabet cereal bowl 
in the morning. Aaarrggg.....

Thanks (I think) :-)

tedd
-- 
--------------------------------------------------------------------------------
http://sperling.com/




 

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

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