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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + rtf to XML (4)
-> + Questions Regarding Existing B... (3)
-> + Bug: Saved Changes Lost Switch... (3)
-> - Adding Simple Types to Attribu... (4)
-> ->Adding Simple Types to At...
-> ->Adding Simple Types to At...
-> ->Adding Simple Types to At...
-> + SQL Table to XML Convert error... (9)
-> + please help me with style shee... (2)
-> + WSDL Misbehaving (4)
-> + Regarding XSLT logic for a sim... (2)
-> + Regarding XSLT logic for a sim... (2)
-> + Integration with VB.Net (5)
-> + License for end user (5)
-> + Error when running xalan sampl... (3)
-> + generate the date time in xslt... (2)
-> + Error When Using XMLConverters... (5)
-> + Viewing the toolbox pane (3)
-> + In Sync (2)
-> + Java EE 5 SDK vs. Java 2 SDK S... (2)
-> - Odd behavior of Begin Field in... (1)
-> + I/O-error while saving style s... (2)
-> + WEB Service Session (2)
-- Previous [1381-1400] [1401-1420] [1421-1440] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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
(Deleted User) Subject: Adding Simple Types to Attributes in Diagram View
Author: (Deleted User)
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

   
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.