Value validation [message #47445] |
Tue, 08 June 2004 10:59 |
Eclipse User |
|
|
|
Originally posted by: invalid.soft-gems.net
Ed,
Is there a built-in facility to check whether a given value is valid
compared to the effective facets of its type? I can write this myself, but
I would suspect that this is an often needed feature when working with
schemas, so it would be cool if there is already an implementation.
Mike
--
www.soft-gems.net
|
|
|
Re: Value validation [message #47505 is a reply to message #47445] |
Tue, 08 June 2004 11:24 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Mike,
To determine if a literal is valid with respect to a simple type, you can use
either XSDSimpleTypeDefinition.isValidLiteral or
XSDSimpleTypeDefinition.assess.
Mike Lischke wrote:
> Ed,
>
> Is there a built-in facility to check whether a given value is valid
> compared to the effective facets of its type? I can write this myself, but
> I would suspect that this is an often needed feature when working with
> schemas, so it would be cool if there is already an implementation.
>
> Mike
> --
> www.soft-gems.net
|
|
|
Re: Value validation [message #47535 is a reply to message #47505] |
Tue, 08 June 2004 14:19 |
Eclipse User |
|
|
|
Originally posted by: invalid.soft-gems.net
Ed Merks wrote:
> To determine if a literal is valid with respect to a simple type, you can use
> either XSDSimpleTypeDefinition.isValidLiteral or
> XSDSimpleTypeDefinition.assess.
Works exactly as I wanted it (except for localisation of the error
message, but this is subordinated, currently). Thanks a bunch Ed.
Mike
--
www.soft-gems.net
|
|
|
Re: Value validation [message #47569 is a reply to message #47535] |
Tue, 08 June 2004 14:55 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Mike,
The translation is done at the end of the development cycle. IBM pays for it (and
it's not cheap!) and then donates it to Eclipse. For standalone support, we create
the xsd.resources.jar based on the donation from IBM, so that currently contains
the translation from the 1.1.1.1 release. Unzipping that file and copying the
*.properties file to where the English plugin.properties file is should get you
translation for what was translated before...
Mike Lischke wrote:
> Ed Merks wrote:
>
> > To determine if a literal is valid with respect to a simple type, you can use
> > either XSDSimpleTypeDefinition.isValidLiteral or
> > XSDSimpleTypeDefinition.assess.
>
> Works exactly as I wanted it (except for localisation of the error
> message, but this is subordinated, currently). Thanks a bunch Ed.
>
> Mike
> --
> www.soft-gems.net
|
|
|
Re: Value validation [message #47593 is a reply to message #47569] |
Tue, 08 June 2004 14:56 |
Eclipse User |
|
|
|
Originally posted by: invalid.soft-gems.net
Ed Merks wrote:
> Mike,
> The translation is done at the end of the development cycle. IBM pays for
it (and
> it's not cheap!) and then donates it to Eclipse. For standalone support, we
create
> the xsd.resources.jar based on the donation from IBM, so that currently
contains
> the translation from the 1.1.1.1 release. Unzipping that file and copying
the
> *.properties file to where the English plugin.properties file is should get
you
> translation for what was translated before...
This is excellent news Ed. We were thinking of doing this (at least
partially) ourselves but this way is much better :-)
A last question for today: How would I go to get an assigned default value
for an attribute if there is one? I could not find anything related to
"default" in XSDSimpleTypeDefinition interface.
Mike
--
www.soft-gems.net
|
|
|
Re: Value validation [message #47622 is a reply to message #47593] |
Tue, 08 June 2004 15:09 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Mike,
XSDFeature.getValue will return the default value of an XSDElementDeclaration or
an XSDAttributeDeclaration. This is an XML Schema infoset property. It is
computed from XSDFeature.getLexicalValue, which is the string literal default as
it appears in the schema.
Mike Lischke wrote:
> Ed Merks wrote:
>
> > Mike,
>
> > The translation is done at the end of the development cycle. IBM pays for
> it (and
> > it's not cheap!) and then donates it to Eclipse. For standalone support, we
> create
> > the xsd.resources.jar based on the donation from IBM, so that currently
> contains
> > the translation from the 1.1.1.1 release. Unzipping that file and copying
> the
> > *.properties file to where the English plugin.properties file is should get
> you
> > translation for what was translated before...
>
> This is excellent news Ed. We were thinking of doing this (at least
> partially) ourselves but this way is much better :-)
>
> A last question for today: How would I go to get an assigned default value
> for an attribute if there is one? I could not find anything related to
> "default" in XSDSimpleTypeDefinition interface.
>
> Mike
> --
> www.soft-gems.net
|
|
|
Re: Value validation [message #47651 is a reply to message #47622] |
Wed, 09 June 2004 08:33 |
Eclipse User |
|
|
|
Originally posted by: invalid.soft-gems.net
Ed,
> XSDFeature.getValue will return the default value of an
XSDElementDeclaration or
> an XSDAttributeDeclaration. This is an XML Schema infoset property. It is
> computed from XSDFeature.getLexicalValue, which is the string literal
default as
> it appears in the schema.
Thank you.
Mike
--
www.soft-gems.net
|
|
|
Re: Value validation [message #588272 is a reply to message #47445] |
Tue, 08 June 2004 11:24 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Mike,
To determine if a literal is valid with respect to a simple type, you can use
either XSDSimpleTypeDefinition.isValidLiteral or
XSDSimpleTypeDefinition.assess.
Mike Lischke wrote:
> Ed,
>
> Is there a built-in facility to check whether a given value is valid
> compared to the effective facets of its type? I can write this myself, but
> I would suspect that this is an often needed feature when working with
> schemas, so it would be cool if there is already an implementation.
>
> Mike
> --
> www.soft-gems.net
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Value validation [message #589128 is a reply to message #47535] |
Tue, 08 June 2004 14:55 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Mike,
The translation is done at the end of the development cycle. IBM pays for it (and
it's not cheap!) and then donates it to Eclipse. For standalone support, we create
the xsd.resources.jar based on the donation from IBM, so that currently contains
the translation from the 1.1.1.1 release. Unzipping that file and copying the
*.properties file to where the English plugin.properties file is should get you
translation for what was translated before...
Mike Lischke wrote:
> Ed Merks wrote:
>
> > To determine if a literal is valid with respect to a simple type, you can use
> > either XSDSimpleTypeDefinition.isValidLiteral or
> > XSDSimpleTypeDefinition.assess.
>
> Works exactly as I wanted it (except for localisation of the error
> message, but this is subordinated, currently). Thanks a bunch Ed.
>
> Mike
> --
> www.soft-gems.net
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Value validation [message #589147 is a reply to message #47593] |
Tue, 08 June 2004 15:09 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Mike,
XSDFeature.getValue will return the default value of an XSDElementDeclaration or
an XSDAttributeDeclaration. This is an XML Schema infoset property. It is
computed from XSDFeature.getLexicalValue, which is the string literal default as
it appears in the schema.
Mike Lischke wrote:
> Ed Merks wrote:
>
> > Mike,
>
> > The translation is done at the end of the development cycle. IBM pays for
> it (and
> > it's not cheap!) and then donates it to Eclipse. For standalone support, we
> create
> > the xsd.resources.jar based on the donation from IBM, so that currently
> contains
> > the translation from the 1.1.1.1 release. Unzipping that file and copying
> the
> > *.properties file to where the English plugin.properties file is should get
> you
> > translation for what was translated before...
>
> This is excellent news Ed. We were thinking of doing this (at least
> partially) ourselves but this way is much better :-)
>
> A last question for today: How would I go to get an assigned default value
> for an attribute if there is one? I could not find anything related to
> "default" in XSDSimpleTypeDefinition interface.
>
> Mike
> --
> www.soft-gems.net
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.05096 seconds