Subject: Re: [xsl] XML source with DOCTYPE declaration From: Zeljko Rajic <zeljko.rajic@xxxxxxxxxx> Date: Thu, 19 Apr 2001 17:59:46 +0200 |
Mike, first thanks for your help so far! Unfortunately I still could not solve the problem and hope that you (or somebody else) could give more some further hints. > Look at the DTD. > > If it defines something like > > <!ATTLIST eee xmlns "a.namespace.uri" #FIXED> I couldn't find any statement like this. What I found is the following: <!ENTITY % NS.prefixed "IGNORE"> <!ENTITY % XHTML.prefixed "%NS.prefixed;"> <!ENTITY % XHTML.xmlns "http://www.w3.org/1999/xhtml"> <!ENTITY % XHTML.prefix ""> <!ENTITY % XHTML.xmlns.attrib "xmlns %URI.datatype; #FIXED '%XHTML.xmlns; %XLINK.xmlns.attrib;"> To be precise I use the XHTML Basic 1.0 DTD ! As I'm not that much familiar with DTDs I'm not sure what these statements exactly do. It would be great if somebody could send me a (simple) sample for transforming XHTML input. What I basically would like to do is such a sample like this... [... XHTML Basic 1.0 input start ...] <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> <html> <head> <title/> </head> <body title="article"> <p>Some Content !</p> </body> </html> [... XHTML Basic 1.0 input end ...] [... XSLT stylesheet start ...] <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:text>ROOT element found !</xsl:text> <xsl:copy-of select="."/> <xsl:apply-templates/> </xsl:template> <xsl:template match="/html"> <xsl:text>HTML tag found !!!</xsl:text> </xsl:template> </xsl:stylesheet> [... XSLT stylesheet start ...] [... transformation output start ...] <html xmlns="http://www.w3.org/1999/xhtml" version="-// W3C//DTD XHTML Basic 1.0//EN"> <head xmlns="http://www.w3.org/1999/xhtml" profile=""> <title xmlns="http://www.w3.org/1999/xhtml"/> </head> <body title="article" xmlns="http://www.w3.org/1999/xhtml"> <p xmlns="http://www.w3.org/1999/xhtml">Some Content !</p> </body> </html> [... transformation output end ...] What I'm surprised of is that every tag got an 'xmlns' attribute added, although only a simple <xsl:copy-of/> was executed. Hope somebody can help me here and tell me how to get the upper sample running. If possible the stylesheet should use the default namespace, meaning if possible the expression matching patterns should not use prefixes. Thanks for any advice in advance! - Zeljko XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XML source with DOCTYPE d, Michael Kay | Thread | Re: [xsl] XML source with DOCTYPE d, Jeni Tennison |
[xsl] getting the first three, Sandeep Hundal | Date | AW: AW: [xsl] for-each with include, Machelett, Renato |
Month |