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
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Jesus PeraitaSubject: Inconsistent usage of quotes in xsd editor
Author: Jesus Peraita
Date: 02 Oct 2007 11:21 AM
Dear all,

The schema editor has a peculiar way of handling quotes.

Given this (Stylus Studio-generated) fragment:
...
<xsd:element name='record'>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref='id'/>
<xsd:element ref='changed'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
...

If I change the cardinality of 'id' to minOccurs='0', I get the following:
...
<xsd:element name='record'>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="id" minOccurs="0"/>
<xsd:element ref='changed'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
...

So, Studio uses single quotes when generating the initial xsd file but changes to double quotes when this xsd is somehow modified.

Am I missing something?
Is there a way to stick to just one kind of quotes?

Thanks a lot for your help.

Regards,

Jesus

Postnext
Ivan PedruzziSubject: Inconsistent usage of quotes in xsd editor
Author: Ivan Pedruzzi
Date: 02 Oct 2007 11:26 AM

In which way having two styles of quotes create troubles except the aesthetic?

Thanks!
Ivan Pedruzzi
Stylus Studio Team

Postnext
Jesus PeraitaSubject: Inconsistent usage of quotes in xsd editor
Author: Jesus Peraita
Date: 02 Oct 2007 11:39 AM
Hi Ivan!

Do you mean that this feature has been added on purpose in order to make Stylus Studio-generated code look untidy or sloppy? :-)

Indents are nicely handled though...

Kind regards,

Jesus

Postnext
Minollo I.Subject: Inconsistent usage of quotes in xsd editor
Author: Minollo I.
Date: 02 Oct 2007 01:07 PM
Usually XML documents and XML Schemas are meant for consumption by software applications rather than by human beings; software applications don't distinguish between single and double quotes usage, as the grammar allows both. As usually readability of the documents is not affected by the use of quotes, development/debugging by humans is usually not negatively impacted either.

Indentation is slightly different; it does indeed change the underlying representation of the XML document (in fact, in some cases software applications do complain on indented files, having to deal with text nodes that might be unexpected), but it helps enourmously during development and debugging by humans.

Anyway, thanks for the feedback, we'll surely keep it under consideration.

Posttop
Jesus PeraitaSubject: Inconsistent usage of quotes in xsd editor
Author: Jesus Peraita
Date: 02 Oct 2007 01:26 PM
Originally Posted: 02 Oct 2007 01:27 PM
Thanks for your reply.

You're right. Once the schema goes into production, it will consumed only by machines. But first it must go through several cycles of peer-reviewing, analysing, refining, etc.

Here, humans (developers) will literally turn the whole thing inside out, and use tools like Stylus Studio and xmlSpy to look at the xsd code. That's the stage at which an unconsistent usage of quotes worries me. Not because it will impact the actual usage of the xsd, but because my colleagues might not get a good image of my coding style.

Again thanks for your comment.

Regards,

Jesus

 
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.