EDN Admin
Well-known member
I have an XSD with the following simpleType:
<div style="color:black; background-color:white
<pre><span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleType <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue FUME_CD<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 restriction <span style="color:red base<span style="color:blue =<span style="color:black "<span style="color:blue xs:integer<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 pattern <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue [0-9]{4}<span style="color:black "<span style="color:blue />
<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 restriction<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleType<span style="color:blue >
[/code]
This currently only accepts anything from 0000 to 9999. The problem is, we want to be able to accept "no value." That is, the following XML should validate:<br/>
<br/>
<div style="color:black; background-color:white
<pre><span style="color:blue <<span style="color:#a31515 FUME_CD<span style="color:blue ><span style="color:blue </<span style="color:#a31515 FUME_CD<span style="color:blue >
[/code]
Currently, I keep getting the error:
is not a valid value for integer.
Any help would be most appreciated. Thanks.<br/>
<br/>
View the full article
<div style="color:black; background-color:white
<pre><span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleType <span style="color:red name<span style="color:blue =<span style="color:black "<span style="color:blue FUME_CD<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 restriction <span style="color:red base<span style="color:blue =<span style="color:black "<span style="color:blue xs:integer<span style="color:black "<span style="color:blue >
<span style="color:blue <<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 pattern <span style="color:red value<span style="color:blue =<span style="color:black "<span style="color:blue [0-9]{4}<span style="color:black "<span style="color:blue />
<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 restriction<span style="color:blue >
<span style="color:blue </<span style="color:#a31515 xs<span style="color:blue :<span style="color:#a31515 simpleType<span style="color:blue >
[/code]
This currently only accepts anything from 0000 to 9999. The problem is, we want to be able to accept "no value." That is, the following XML should validate:<br/>
<br/>
<div style="color:black; background-color:white
<pre><span style="color:blue <<span style="color:#a31515 FUME_CD<span style="color:blue ><span style="color:blue </<span style="color:#a31515 FUME_CD<span style="color:blue >
[/code]
Currently, I keep getting the error:
is not a valid value for integer.
Any help would be most appreciated. Thanks.<br/>
<br/>
View the full article