Book a Demo

Author Topic: Default values for elements in XSD  (Read 3999 times)

xjecht

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Default values for elements in XSD
« on: September 13, 2007, 12:48:48 am »
Hi,
is it somehow possible to customize XSD generation in order to include default (initial) value for element declaration ?

Something like this :

<xs:element name="level" type="xs:string" default="TEST">

The second problem is that I need only one root element declaration in my schema (XSDTopLevelElement) - how can I turn off root element generating ?

I am using EA 7.0.814

Thanks.

Tomas

thomaskilian

  • Guest
Re: Default values for elements in XSD
« Reply #1 on: September 13, 2007, 03:50:50 am »
I would suspect some Tag to be responsible for that, but would not know which or if I'm right at all.

ACSmith

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Default values for elements in XSD
« Reply #2 on: October 09, 2007, 05:56:49 am »
I put this same question to EA Support. Here is their reply:

EA currently allows importing / generating the default value only on
"XSDattribute" constructs. Hence the missing default values on
"XSDelement" constructs.
Unfortunately, there is no work-around this issue at this stage. But, we
will treat this as a feature request for the future releases of EA.

I've asked when they might get it implemented. If I get a response, I'll let you know.

ACSmith

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Default values for elements in XSD
« Reply #3 on: October 10, 2007, 10:35:36 am »
I was told that this feature would be included in EA 7.1.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Default values for elements in XSD
« Reply #4 on: October 10, 2007, 11:35:47 am »
Well, that's progress. And in the positive direction too.
No, you can't have it!

xjecht

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Default values for elements in XSD
« Reply #5 on: October 10, 2007, 11:46:11 pm »
Thanks for info.