|
Home > Archive > MS SQL XML > January 2006 > XSD schema question...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XSD schema question...
|
|
| Nestor 2006-01-03, 3:23 am |
| Hello all, I've a question on the xsd schema. Assuming a XML file which looks like
<test>
<code>nothing</code>
<text>something here</text>
<exp_date>20050101</exp_date>
</test>
with the schema looking like
<xs:element minOccurs="0" name="test">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="code" type="xs:string" />
<xs:element minOccurs="0" name="text" type="xs:string" /> <--- error here -->
<xs:element minOccurs="0" name="exp_date" type="xs:unsignedShort" />
</xs:sequence>
</xs:complexType>
</xs:element>
This xsd schema will not work as
<xs:element minOccurs="0" name="text" type="xs:string" /> will not be acceptable.
Does anyone knows how the element can be substituted? I'm using this schema with SQL Integration Services and it's returning errors.
Thanks.
Regards,
David Ong
| |
|
| Hi
Your XML is not valid against your schema. Not because of the <text> element
but of <exp_date>. You declared the element as unsignedShort but the number
in the element exceeds the limit of the data type, 65535.
--
Pohwan Han. Seoul. Have a nice day.
"Nestor" <n3570r@yahoo.com> wrote in message
news:eG46txBEGHA.3920@tk2msftngp13.phx.gbl...
Hello all, I've a question on the xsd schema. Assuming a XML file which
looks like
<test>
<code>nothing</code>
<text>something here</text>
<exp_date>20050101</exp_date>
</test>
with the schema looking like
<xs:element minOccurs="0" name="test">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="code" type="xs:string" />
<xs:element minOccurs="0" name="text" type="xs:string" /> <--- error
here -->
<xs:element minOccurs="0" name="exp_date" type="xs:unsignedShort" />
</xs:sequence>
</xs:complexType>
</xs:element>
This xsd schema will not work as
<xs:element minOccurs="0" name="text" type="xs:string" /> will not be
acceptable.
Does anyone knows how the element can be substituted? I'm using this schema
with SQL Integration Services and it's returning errors.
Thanks.
Regards,
David Ong
| |
| Nestor 2006-01-03, 3:23 am |
| Sorry for the bad example, ignore the datatype limit I was just giving a
random number without thinking.
The problem I am facing is with the <text> element. SSIS will report a
"content type is text only" error on validation. Anyone able to help?
"Han" <hp4444@kornet.net.korea> wrote in message
news:uvaPcRDEGHA.2040@TK2MSFTNGP14.phx.gbl...
> Hi
>
> Your XML is not valid against your schema. Not because of the <text>
> element but of <exp_date>. You declared the element as unsignedShort but
> the number in the element exceeds the limit of the data type, 65535.
>
> --
> Pohwan Han. Seoul. Have a nice day.
> "Nestor" <n3570r@yahoo.com> wrote in message
> news:eG46txBEGHA.3920@tk2msftngp13.phx.gbl...
> Hello all, I've a question on the xsd schema. Assuming a XML file which
> looks like
>
> <test>
> <code>nothing</code>
> <text>something here</text>
> <exp_date>20050101</exp_date>
> </test>
>
> with the schema looking like
> <xs:element minOccurs="0" name="test">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="code" type="xs:string" />
> <xs:element minOccurs="0" name="text" type="xs:string" /> <--- error
> here -->
> <xs:element minOccurs="0" name="exp_date" type="xs:unsignedShort" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> This xsd schema will not work as
> <xs:element minOccurs="0" name="text" type="xs:string" /> will not be
> acceptable.
>
> Does anyone knows how the element can be substituted? I'm using this
> schema with SQL Integration Services and it's returning errors.
>
> Thanks.
> Regards,
> David Ong
>
>
| |
| Michael Rys [MSFT] 2006-01-12, 8:24 pm |
| Could you please provide an actual repro?
Thanks
Michael
"Nestor" <n3570r@yahoo.com> wrote in message
news:uxHp6UDEGHA.3468@TK2MSFTNGP15.phx.gbl...
> Sorry for the bad example, ignore the datatype limit I was just giving a
> random number without thinking.
>
> The problem I am facing is with the <text> element. SSIS will report a
> "content type is text only" error on validation. Anyone able to help?
>
>
> "Han" <hp4444@kornet.net.korea> wrote in message
> news:uvaPcRDEGHA.2040@TK2MSFTNGP14.phx.gbl...
>
>
|
|
|
|
|