XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Guy CretsSubject: For-each when minOccurs > 1 in XSD
Author: Guy Crets
Date: 10 Mar 2005 08:24 AM
Hi all,

Sonic Stylus Studio doesn't seem to understand that an element has multiple occurrences.
Sample (simple) schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="group">
<xs:element name="subgroup" minOccurs="1" maxOccurs="unbounded">
<xs:element name="element" type="xs:string">

When creating an XSLT map between 2 instances of the above schema, Stylus does not show the "multiple occurrences icon" for the element 'subgroup'.

Stylus generates the following XSLT map:
<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="group/subgroup"/>
<xsl:value-of select="group/subgroup/element"/>

This doesn't look quite right!
Is this a bug, or am I really missing something?
Is there a workaround available?

Kind regards, Guy Crets

(Deleted User) Subject: For-each when minOccurs > 1 in XSD
Author: (Deleted User)
Date: 11 Mar 2005 10:28 AM
hi, Guy

This is a bug and is already fixed in our internal build.
The problem happens when the maxOccurs="unbounded"

In the meanwhile, if you do want to create for-each between source and target, you can right
click on source node and link to a target node, mapper will give you a chance to decide if you
want to create repeatable link which will create for-each in XSLT.

Hope this helps.


Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.