Subject: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:
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.
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.