IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Missing attributes Options · View
sskarupa
Posted: Friday, December 30, 2005 12:43:36 PM
Rank: Newbie

Joined: 12/30/2005
Posts: 2
Location: US
I'm relatively new to XMLSpy but I am struggling with something that seems pretty fundemental.

In the Text view for a schema I have defined the following element:

Code:
<xs:element name="GetInternalAccountById">
  <xs:complexType>
     <xs:sequence>
    <xs:element name="internalAccountId" type="xs:long minOccurs="1" maxOccurs="1"/>
     </xs:sequence>            
   </xs:complexType>
</xs:element>

I then save the document, close the document and then reopen. It automatically reopens in the Schema/WSDL view and because I perfer to work in the raw text I switch to the Text view.

In the Text view I see the following:

Code:
<xs:element name="GetInternalAccountById">
  <xs:complexType>
     <xs:sequence>
    <xs:element name="internalAccountId" type="xs:long"/>
     </xs:sequence>
   </xs:complexType>
</xs:element>

Notice that the minOccurs and maxOccurs attributes are now removed... What is going on?

Note: this also happens for the name attribute of an input node in the bindings section of a WSDL too.

I am running XMLSpy Enterprise Edition Version 2005 rel. 3.

Any thoughts?

-Steve
For
sskarupa
Posted: Friday, December 30, 2005 1:07:12 PM
Rank: Newbie

Joined: 12/30/2005
Posts: 2
Location: US
I think I solved this one myself. Just need to stay away from the Schema/WSDL view and set the filetype for xsd and wsdl to always open in text view.

Still seems like a bug but as long as I can continue to work without it messing up my code I'm happy.

Steps to fix:
> Select Tools menu
> Select Options menuitem
> Select File types tab
> Select .xsd in the file type list box
> Select Text view option in the Default view section
> Click Apply button
> Click OK button

-Steve
island
Posted: Tuesday, January 3, 2006 7:23:56 AM
Rank: Newbie

Joined: 10/28/2002
Posts: 1,283
Location: AT
Dear sskarupa,

it is not a bug but just how this fucntionality was implemented i.e. the default value of any element is always minOccurs="1" and maxOccurs="1" so it is not really necessary to explicitly mention these attributes if the values are equal to "1".
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.