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: [xsl] possible nested loops


Subject: RE: [xsl] possible nested loops
From: garry@xxxxxxxxxxxxxxxxxxx
Date: Wed, 15 Feb 2006 08:07:45 -0000 (GMT)

This would give a better approximation to what I have.

<country>
<name></name>
> <state>
>    <city/>
>    <city>
> </state>
> <state>
>    <city/>
>    <city>
> </state>
> <state>
>    <city/>
>    <city>
      <city/>
>    <city>
      <city/>
>    <city>
> </state>
> </country>
<country>
<name></name>
> <state>
>    <city/>
>    <city>
> </state>
> <state>
>    <city/>
>    <city>
> </state>
> <state>
>    <city/>
>    <city>
> </state>
> </country

I need to return each country's data as one block before the next. When I
use code such as that on page 615 of Michael Kay's book - XSLT 2 (fill in
the blanks type) I can get the country name to repeat:

<xsl:for-each select="//country">
<xsl-if test="name"><input name="country.name:records"
value="{name}"></xsl-if>
</xsl-for-each>

But when I use another for-each loop inside this I get spurious results
when applied to an xml document containing 2 pupil records and if I apply
it to my 800 plus record xml doc, Oxygen runs out of memory and xmlSpy
dies during the transformation.
I am on another machine here so I can't post the original docs at present
but will do later if it would help.
regards
garry


Current Thread
Keywords
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