Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Empty element match

From: Tjerk Wolterink <tjerk@------------------.--->
To: 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?


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent