Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Empty element match >Thread Next - Re: Empty element match Re: Empty element matchTo: NULL Date: 7/2/2005 12:41:00 AM Martin Honnen wrote:
>
>
> Tjerk Wolterink wrote:
>
>
>> In page.xsl there is a rule like this:
>>
>> <!--
>> ! All html should remain html
>> !-->
>> <xsl:template match="*[namespace-uri(.)='' or
>> namespace-uri(.)='http://www.w3.org/1999/xhtml']">
>> <xsl:copy>
>> <xsl:for-each select="@*">
>> <xsl:copy/>
>> </xsl:for-each>
>> <xsl:apply-templates select="./node()"/>
>> </xsl:copy>
>> </xsl:template>
>>
>>
>> Maybe this rule forces <br/> to convert to <br></br>
>
>
> If you really want HTML output then you should strip the namespace from
> XHTML elements e.g.
> <xsl:template match="xhtml:*">
> xmlns:xhtml="http://www.w3.org/1999/xhtml">
> <xsl:element name="{local-name()}">
> <xsl:copy-of select="@*" />
> <xsl:apply-templates />
> </xsl:element>
> </xsl:template>
Ok thus namespaces are not allowed in html?
I cannot wait until browser truely support xml syntax.
Another question,
How does xsl handle empty elements,
does it convert them to
<element/>
or to
<element></element>
And are there any settings in the parser to control that?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
