BizTalk Server Applications Integration - Biztalk 2004 inline schema? Validating one XML file with two schemas?

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Applications Integration > July 2004 > Biztalk 2004 inline schema? Validating one XML file with two schemas?





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 Biztalk 2004 inline schema? Validating one XML file with two schemas?
Kelvin Tsang

2004-04-26, 1:37 pm

I have an XML file and I would like to generate a schema from it. I
used this good website to generate the schema:

http://apps.gotdotnet.com/xmltools/...ce/Default.aspx

However, from one XML file it generated two schemas(copied below). Do
you guys know how to put these two schemas into Biztalk 2004? I tried
to use any one of them to validate my original XML file but failed.
Are there ways that I can "combine" schemas?

I also tried to use the DataSet infer schema method to generate a
schema, but it only returns me "Schema 0".

Thank you in advance. (Schemas below)

Schema 0: urn:schemas-microsoft-com:rowset
------------------------------------------
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:tns="urn:schemas-microsoft-com:rowset"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="urn:schemas-microsoft-com:rowset"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="#RowsetSchema" />
<xs:element name="data">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" xmlns:q1="#RowsetSchema"
ref="q1:row" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Schema 1: #RowsetSchema
-----------------------
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:tns="#RowsetSchema"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="#RowsetSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="row">
<xs:complexType>
<xs:attribute name="record_id" type="xs:unsignedByte"
use="required" />
<xs:attribute name="code_despatch_board_record_id"
type="xs:unsignedByte" use="required" />
<xs:attribute name="button_description" type="xs:string"
use="required" />
<xs:attribute name="board_code" type="xs:string" use="required"
/>
<xs:attribute name="board_description" type="xs:string"
use="required" />
<xs:attribute name="plate_number" type="xs:unsignedByte"
use="required" />
<xs:attribute name="button_image" type="xs:string"
use="required" />
<xs:attribute name="button_update" type="xs:string"
use="required" />
<xs:attribute name="category" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
Tatyana Yakushev [MSFT]

2004-07-09, 5:48 pm

You need to import one schema into the other schema. (Select <Schema> node, go to Imports property, open the dialog, click add and select the other schema).

Regards,
Tatyana
--------------------
>From: google@vpn-monitor.com (Kelvin Tsang)
>Newsgroups: microsoft.public.biztalk.appintegration
>Subject: Biztalk 2004 inline schema? Validating one XML file with two schemas?
>Date: 26 Apr 2004 10:28:05 -0700
>Organization: http://groups.google.com
>Lines: 62
>Message-ID: <5aa83b8d.0404260928.6a6486f8@posting.google.com>
>NNTP-Posting-Host: 209.17.147.250
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1083000486 4044 127.0.0.1 (26 Apr 2004 17:28:06 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Mon, 26 Apr 2004 17:28:06 +0000 (UTC)
>Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!news.glorb.com!postnews1.google.com!not-

for-mail
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.appintegration:6575
>X-Tomcat-NG: microsoft.public.biztalk.appintegration
>
>I have an XML file and I would like to generate a schema from it. I
>used this good website to generate the schema:
>
>http://apps.gotdotnet.com/xmltools/...ce/Default.aspx
>
>However, from one XML file it generated two schemas(copied below). Do
>you guys know how to put these two schemas into Biztalk 2004? I tried
>to use any one of them to validate my original XML file but failed.
>Are there ways that I can "combine" schemas?
>
>I also tried to use the DataSet infer schema method to generate a
>schema, but it only returns me "Schema 0".
>
>Thank you in advance. (Schemas below)
>
>Schema 0: urn:schemas-microsoft-com:rowset
>------------------------------------------
><?xml version="1.0" encoding="utf-16"?>
><xs:schema xmlns:tns="urn:schemas-microsoft-com:rowset"
>attributeFormDefault="unqualified" elementFormDefault="qualified"
>targetNamespace="urn:schemas-microsoft-com:rowset"
>xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="#RowsetSchema" />
> <xs:element name="data">
> <xs:complexType>
> <xs:sequence>
> <xs:element maxOccurs="unbounded" xmlns:q1="#RowsetSchema"
>ref="q1:row" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
></xs:schema>
>
>Schema 1: #RowsetSchema
>-----------------------
><?xml version="1.0" encoding="utf-16"?>
><xs:schema xmlns:tns="#RowsetSchema"
>attributeFormDefault="unqualified" elementFormDefault="qualified"
>targetNamespace="#RowsetSchema"
>xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="row">
> <xs:complexType>
> <xs:attribute name="record_id" type="xs:unsignedByte"
>use="required" />
> <xs:attribute name="code_despatch_board_record_id"
>type="xs:unsignedByte" use="required" />
> <xs:attribute name="button_description" type="xs:string"
>use="required" />
> <xs:attribute name="board_code" type="xs:string" use="required"
>/>
> <xs:attribute name="board_description" type="xs:string"
>use="required" />
> <xs:attribute name="plate_number" type="xs:unsignedByte"
>use="required" />
> <xs:attribute name="button_image" type="xs:string"
>use="required" />
> <xs:attribute name="button_update" type="xs:string"
>use="required" />
> <xs:attribute name="category" type="xs:string" use="required" />
> </xs:complexType>
> </xs:element>
></xs:schema>
>



--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com