This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Container HTML around recursive collection


David,

>Hi Chris,
>
>I am sorry my code is so ugly. I really am a novice at XSL.
>
>I am afraid that I still don't see how the dirTOxml example
>relates since it relies on  <xsl:apply-templates> and
><xsl:template match=????>. I thought that this would not work with
>things like:
><item>
>  <item/>
>  <item/>
>  <item/>
>    <item/>
>    <item/>
>  </item>
>  <item/>
></item>

That is the whole point of xslt that is what it is for

<xsl:template match="item">
	<div>
		<xsl:apply-templates />
	</div>
</xsl:template>

will give you

<div>
  <div>if you had something here</div>
  <div/>
  <div>
    <div/>
    <div/>
  </div>
  <div/>
</div>

in the dirTOxml template it works on xml where all container elements are
called folder which can be as deep as your hard drive can handle.

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]