Subject: [xsl] xhtml and different namespace From: Björn Boxstart <Boxstart@xxxxxxxx> Date: Wed, 11 Jun 2003 09:37:29 +0200 |
Hello, Ik have a strange problem with a document that I want to process. The document conforms to the XHTML dtd. The only thing I want to do is remove the DTD declaration and add a new top element. Although I set the output method to be xml, the document always is being returned as xhtml with the xhtml namespace. I want to transform this resulting document (see below) with another xsl-t stylesheet. <?xml version="1.0" encoding="UTF-8"?> <Iisg source="biografie"><biography> <xhead> <meta xmlns="http://www.w3.org/1999/xhtml" name="generator" content="HTML Tidy for Windows (vers 1st August 2002), see www.w3.org"/> <meta xmlns="http://www.w3.org/1999/xhtml" http-equiv="content-type" content="text/html; charset=iso-8859-1"/> <link href="styles/bwsa.css" type="text/css" rel="stylesheet"/> <title xmlns="http://www.w3.org/1999/xhtml">Piet Aalberse</title> </xhead> <body xmlns="http://www.w3.org/1999/xhtml" bgcolor="#ffffff"> <table> ... more data to go here ... </table> </body> </Iisg> My problem is that the elements that have the namespace declaration as an attribute seem to have a prefix and therefore are not processed by my templates. Something like match='title' doesn't work on a template while match="*[local-name() = 'title']" does. When I want to display the prefix (e.g. by <xsl:value-of select="substring-before(name(),':')" this doesn't return anything at all. It looks like when I make a template for the body element like: <xsl:template match="*[local-name() = 'body']"> <xsl:apply-templates select="table" /> </xsl:template> This doesn't seem to work because it looks like the table is part of another namespace as the body element. Does anybody know what I'm doing wrong? I tried several processors and they all have sort of the same result, so I think that I'm the problem and not the processor ;-( Thanks in advance! Best regards, bjorn Data Concept Documentation Services Europe BV Costerweg 12 4104 AJ Culemborg P.O. Box 37 4100 AA Culemborg The Netherlands Tel +31 (0) 345 510 879 Fax +31 (0) 345 510 867 Website www.dcdds.nl XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Re: Re: xsl:for-each eval, Dimitre Novatchev | Thread | Re: [xsl] xhtml and different names, Joe Fawcett |
[xsl] How to stop xalan from deleti, Peter Janker | Date | [xsl] Grouping, Andy . Stephen |
Month |