04-15-2003, 09:45 PM
I want to turn something like this
<heading>All your base are belong to <emphasis>us</emphasis></heading>
into something like this
<h1>All your base are belong to <em>us</em></h1>
Basically - how to transform nodes which may have mixed content.
04-24-2003, 02:53 AM
First you should try to use a pre-defined schema, such as docbook, this way you will find a much wider range of support for it.
Firstly is you html; xhtml compliant if so you will find it easier to replace as you can simply parse the xhtml for an xml file interchangeably and then parse that with xslt.
as an example...
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<b><xsl:value-of select="." /></b>
basically it will wrap your heading element inside an bold element.
04-24-2003, 02:56 PM
Thank you - but value-of won't apply the emphasis, it will just write the heading at the same weight. I'm already quite familiar with XSLT - but how to parse a node where the node contains mixed data, that's my question.