|
To Magnus & Karl Avedal:
it will be good idea to open "users contribution" topic at www.OrionServer.com ( like orionsupport was). and as result traffic in
orion-interest will be decreased :)
----- Original Message -----
1) use <xmp> </xmp> tags - pre can;'t
help.
2) use this xsl for XML parsing - ( i use it with
Salaman's Saxon XSLT engine, but it will work under Orion default XSLT (xerces))
it will display your XML as HTML with XML reformating and coloring
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="windows-1251" indent="yes"/> <!-- Generic stylesheet for viewing XML
-->
<!-- This stylesheet has been modified to use modes instead of nested templates. --> <!-- Last Updated by Parf: moved to lotus xsl, main tag fix --> <xsl:template
match="/">
<HTML> <xsl:apply-templates/> </HTML> </xsl:template> <xsl:template
match="node()">
<xsl:if test="name()!='xml-stylesheet'"> <b><big><xsl:text><</xsl:text><xsl:value-of select="name()"/><xsl:text>></xsl:text></big></b><br/> <DIV STYLE="font-family:Courier; font-size:10pt; margin-bottom:0em"> <xsl:apply-templates mode="inside"/> </DIV> <b><big><xsl:text></</xsl:text><xsl:value-of select="name()"/><xsl:text>></xsl:text></big></b> </xsl:if> </xsl:template> <xsl:template match="*"
mode="inside">
<DIV STYLE="margin-left:1em"> <SPAN STYLE="color:blue"> <xsl:text><</xsl:text> <b><xsl:value-of select="name()"/></b> <xsl:for-each select="@*"> <xsl:call-template name="attribute"/> </xsl:for-each> <xsl:choose> <xsl:when test="self::node()"> <xsl:text>></xsl:text> <xsl:apply-templates mode="inside"/> <xsl:text></</xsl:text> <xsl:value-of select="name()"/> <xsl:text>></xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>/></xsl:text> </xsl:otherwise> </xsl:choose> </SPAN> </DIV> </xsl:template> <xsl:template
name="attribute">
<SPAN STYLE="color:navy"> <xsl:text> </xsl:text> <xsl:value-of select="name()"/> <xsl:text>="</xsl:text> <SPAN STYLE="color:black"> <xsl:value-of select="."/> </SPAN> <xsl:text>"</xsl:text> </SPAN> </xsl:template> <xsl:template match="comment()"
mode="inside">
<SPAN STYLE="color:orange"> <xsl:text><!--</xsl:text><xsl:value-of select="."/><xsl:text>--></xsl:text> </SPAN> </xsl:template> <xsl:template
match="processing-instruction()" mode="inside">
<DIV STYLE="margin-left:1em; color:maroon"> <xsl:text><?</xsl:text> <xsl:value-of select="name"/> <xsl:text> </xsl:text> <xsl:value-of select="."/> <xsl:text>?></xsl:text> </DIV> </xsl:template> <xsl:template match="text()"
mode="inside">
<SPAN STYLE="color:green"> <xsl:value-of select="."/> </SPAN> </xsl:template> </xsl:stylesheet>
|
- displaying xml Derek Akers
- Re: displaying xml Troy E. Echols
- Re: displaying xml Derek Akers
- Re: displaying xml Porfiriev Sergey
- Re: displaying xml Joseph B. Ottinger
- Re: displaying xml Stephan Schmidt
- IP restriction Fox!MURDER
- RE: displaying xml Hani Suleiman
- RE: displaying xml Joseph B. Ottinger
- RE: displaying xml Jim Archer
- Re: displaying xml Miles Daffin
- Re: displaying xml Derek Akers
- Re: displaying xml Joseph B. Ottinger
- FAQ-o-matic and OrionSupport (was Re: displayi... Jason Rimmer
