|
Home > Archive > BizTalk Server General > April 2004 > Error - Incomplete Content
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 |
Error - Incomplete Content
|
|
|
| I have a schema where some of the nodes need to be optional because they don't always exist in the flat file. I have set the min occurs property = 0 but when I try to validate the schema with one of the nodes not existing, it errors saying that "The Elem
ent ABC has incomplete content. Expected Node2..." If I run a file with all nodes, then it validated successfully.
Can anyone tell me the correct way to configure this?
Below is a simplistic example of the schema: (with Node2 being optional):
Node1
Element a
Element b
Element c
Node 2
Element d
Element e
Element f
Node 3
Element g
Element h
Element i
| |
| David Downing [MSFT] 2004-04-23, 12:35 pm |
| Try adding the following annotation to the schemaInfo node of the schema:
parser_optimization="complexity" lookahead_depth="0". You'll need to add
these annotations using a text editor as there is currently no UI to support
them in the Schema Editor.
As an example see the following snippit from a working schema:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://CultureTest.CultureSchema"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://CultureTest.CultureSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo count_positions_by_byte="false"
parser_optimization="complexity" lookahead_depth="0"
suppress_empty_nodes="false" generate_empty_nodes="true"
allow_early_termination="false" standard="Flat File" root_reference="Root"
child_delimiter_type="hex" default_child_delimiter="0x0D 0x0A"
default_child_order="postfix" pad_char_type="char" default_pad_char=" ">
</b:schemaInfo>
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/Schem
aEditorExtensions" />
</xs:appinfo>
....
--
Dave
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <anonymous@discussions.microsoft.com> wrote in message
news:A8777618-62E2-4EB7-A790-BEE66A8A4F80@microsoft.com...
> I have a schema where some of the nodes need to be optional because they
don't always exist in the flat file. I have set the min occurs property = 0
but when I try to validate the schema with one of the nodes not existing, it
errors saying that "The Element ABC has incomplete content. Expected
Node2..." If I run a file with all nodes, then it validated successfully.
>
> Can anyone tell me the correct way to configure this?
>
> Below is a simplistic example of the schema: (with Node2 being optional):
>
> Node1
> Element a
> Element b
> Element c
> Node 2
> Element d
> Element e
> Element f
> Node 3
> Element g
> Element h
> Element i
| |
|
| Thanks for your help David....This resolved my issue.
|
|
|
|
|