A new Zvon tutorial and a little hack

Subject: A new Zvon tutorial and a little hack
From: Miloslav Nic <nicmila@xxxxxxxx>
Date: Tue, 21 Dec 1999 08:10:47 +0100
I have just published a new tutorial (basic XML) at:
http://zvon.vscht.cz/HTMLonly/XMLTutorial/General/book.html

In time of writing I have discovered a little hack, which made the
writing much 
easier. Sometimes the simplest ideas save most time. The example tells
everything:

>From tutorial source: example 7:

<demo type="notwf">
<description>Document with erroneous attributes</description>
<doc>
{errors}
	{wrong_char a<error>*</error>b = "23432"/}
	{mismatched_separator value = <error>"</error>12<error>'</error>/}
	{wrong_separator_type  value="aa<error>"</error>aa"/}
	{wrong_separator_type  value='bb<error>'</error>bb'/}
	{wrong_start <error>XML</error>-ID = "xml234"/}
{/errors}
</doc>
</demo>


and from XSL:

<xsl:template match="text()">
<xsl:value-of select="translate(.,'{}','&lt;&gt;')"/>
</xsl:template>

<xsl:template match="description|doc">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="*">
<xsl:element name="{name()}">
<xsl:apply-templates/>

<xsl:template match="error">
<SPAN class="error"><xsl:apply-templates/></SPAN>
</xsl:template>
-- 
***************************************************************
Dr. Miloslav Nic                        e-mail: nicmila@xxxxxxxx
Department of Organic Chemistry         TEL: +420 2 2435 5012  
ICT Prague (VSCHT Praha)                     +420 2 2435 4118
    				        FAX: +420 2 2435 4288  
****************************************************************
Support free information exchange: http://zvon.vscht.cz
****************************************************************


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread