This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
divide strings
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] divide strings
- From: c-i-e at gmx dot de
- Date: Sun, 23 Sep 2001 13:15:53 +0200 (MEST)
- Cc: daniel dot goldbach at gmx dot de
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hello!
I hope someone can help me... I have the following problem... if you have a
schema with a <union> tag in it, it looks e.g. like this:
</xsd:simpleType>
<xsd:simpleType name="CostelloFamily">
<xsd:union memberTypes="PatsFamily BarbsFamily
JudysFamily TomsFamily RogersFamily
JohnsFamily"/>
</xsd:simpleType>
You can union all simpleTypes mentioned within "memberTypes".
Now my question: I do not want to get the whole String membertypes but I
would like to divide it into its several simpleTypes. Furthermore I would like
to create a loop that runs until all simpleTypes within memberTypes were
selected... In the context above I want to get the String "PatsFamily", do
something with it, then select "BarbsFamily" and so on.
Maybe a code like this makes my problem clear:
<xsl:template match="xsd:union">
<xsl:variable name="memberTypes" select="@memberTypes"/>
<xsl:variable name="OneMemberType">
<while memberTypes != empty>
<OneMemberType = get next simpleType out of memberTypes>
<xsl:apply-templates
select="//xsd:schema/xsd:simpleType[@name=$OneMemberType]"/>
... code ...
</xsl:apply-templates>
</while>
</xsl:template>
Is there a possibility to do that? Any help would be great! =)
greeets & best wishes
Thilo
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list