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 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Paul WadeSubject: Adding Simple Types to Attributes in Diagram View
Author: Paul Wade
Date: 14 Nov 2007 01:37 PM
Originally Posted: 14 Nov 2007 01:34 PM
I'm new to Stylus Studio and still evaluating the feasibility of replacing our other XML tools. I'm trying to figure out how to create the following XSD snippet in diagram view:

<xsd:attribute name="Id" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="8" />
<xsd:minLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>

I've followed the instructions in the documentation, but I'm not able to create the above. After I've created the simple type there is no simple type node for me to select to add the restriction.

What am I doing wrong?

Thanks,
Paul

Postnext
Ivan PedruzziSubject: Adding Simple Types to Attributes in Diagram View
Author: Ivan Pedruzzi
Date: 14 Nov 2007 02:08 PM
Hi Paul,

You should be able to see the anonymous simple type on the canvas, see attached image.

Which Stylus Studio version are you running?

Ivan Pedruzzi
Stylus Studio Team

Postnext
Paul WadeSubject: Adding Simple Types to Attributes in Diagram View
Author: Paul Wade
Date: 14 Nov 2007 02:29 PM
Originally Posted: 14 Nov 2007 02:15 PM
Is that something only available in the Enterprise version? I'm evaluating the Professional version.

Edit: Also, just for clarification, the actual attribute is part of a complex type.

Posttop
Alberto MassariSubject: Adding Simple Types to Attributes in Diagram View
Author: Alberto Massari
Date: 15 Nov 2007 03:04 AM
Hi Paul,
editing a simple type directly inside an attribute is indeed trickier, as the representation of an attribute is not expanded into its components.
So, once you have added the attribute to your complex type, select it, right click on it and choose Add -> SimpleType.
Then go to the text view and place the cursor on the line where the xsd:simpleType has been place.
Now go to the toolbar and click on the Add button, and choose Restriction.
Now go to the property window and fill the Base Type with xsd:string.
Go to the lower part of the property window, click on the first column and select the Max Length facet, and enter its value in the second column; do the same for Min Length.

Hope this helps,
Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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!  
go

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.