xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Disable Output Escaping - really useful


Subject: Re: Disable Output Escaping - really useful
From: Dylan Walsh <Dylan.Walsh@xxxxxx>
Date: Thu, 23 Mar 2000 10:02:42 -0000

	>Date: Wed, 22 Mar 2000 11:47:39 GMT
	>From: David Carlisle <davidc@xxxxxxxxx>
	>Subject: Re: Disable Output Escaping - really useful

	>> Anyone know a way of doing this without disable-output-escaping?
Is using
	>> disable-output-escaping like this a bit of a hack?

	>Any use of disable-output-encoding is _always_ a hack.

	>In a few situations it is useful (I have used it sometimes in my
sheets)
	>but it is _always_ a bad idea, and means that your output tree will
	>not work as expected unless it is going to be reparsed, usually
	>it is only needed to overcome unfortunate markup in the input
document
	>(like useful structure being hidden in a CDATA section).

	Can you explain what "your output tree will not work as expected
unless it is going to be reparsed" means?

	>What you want to do is select every 5th node, and put that node and
its 
	>four next siblings into a tr node.
	>so (untested)
	>
	><xsl:for-each select="item[position() mod 5 = 1]">
	><tr>
	>  <xsl:apply-templates 
	>     select=".|following-siblings::item[position() &lt; 5]"/>
	></tr>
	><xsl:for-each>

	Thanks, this works with a small modification ("sibling" not
"siblings"). I have to say that I would never have been able to come up with
the syntax ".|following-siblings::item[position() &lt; 5]" by myself.

	What about the DOCTYPE issue when XT wouldn't output one? Is there a
non-hack solution to that?


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



Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor