Thanks a lot for your help Chris. I managed to get it to compile down to the
last tag. After which I get this error when I try to derive a new XML file
"Chris Lovett" <someone@nospam.please> wrote in message
news:NZ-dndHfjYw4tfLfRVn-1Q@comcast.com...
>
> Yes, there are tons of problems with this schema. First you cannot
> declare attributes in a simpleType. SimpleTypes are limited to primitive
> values only. Looking at the schema I think they really wanted the
> following:
> <complexType name="SetVar">
> <attribute name="name" type="string"/>
> </complexType>
>
> and
> <complexType name="GetVar">
> <attribute name="name" type="string"/>
> </complexType>
>
> and then I get a different problem which is that on the following you are
> not allowed to specify both a name attribute and a ref attribute:
>
> <element name="li" ref="aiml:ConditionItem" maxOccurs="unbounded"/>
>
> This is fixed by changing the ref= to a type=
>
> But then the following "li" element becomes ambiguous, so I would just
> delete that, not sure what they were trying to achieve there.
>
> Then you get more errors:
> Warning 1 Undefined complexType
> '
http://alicebot.org/AIMLSchema:PatternExpression' is used as a base for
> complex type restriction. C:\temp\AIML.xsd 44 5 Miscellaneous Files
> Warning 2 Undefined complexType '
http://www.w3.org/2001/XMLSchema:string'
> is used as a base for complex type restriction. C:\temp\AIML.xsd 92 5
> Miscellaneous Files
>
> Looks like they are trying to add attributes, so these should be
> extensions of simpleType not restrictions, as follows:
>
> <complexType name="If">
> <simpleContent>
> <extension base="string">
> <attribute name="expr" type="aiml:JavaScriptExpression"/>
> </extension>
> </simpleContent>
> </complexType>
>
> and
>
> <complexType name="Pattern">
> <simpleContent>
> <extension base="aiml:PatternExpression"/>
> </simpleContent>
> </complexType>
>
> Now it finally compiles cleanly.
>
>
>
> "Chuck Bowling" <chuckbowling@sbcglobal-NO-SPAM.net> wrote in message
> news:ez6HWxpSFHA.3156@TK2MSFTNGP15.phx.gbl...
>> AIML Schema:
>>
http://209.168.21.76/CommunityStarterKit/Downloads/258.aspx
>>
>> I have a Schema (in the link above) that I've been trying to make work in
>> VS2003 for a while now and just can't seem to get right. I didn't design
>> the schema and to tell the truth, most of it is beyond my rudimentary
>> understanding of XML.
>>
>> So far, the main problem I've run into is the simpleType below:
>>
>> <simpleType name="VariableName">
>>
>> <restriction base="string">
>>
>> <attribute name="name" type="string" />
>>
>> </restriction>
>>
>> </simpleType>
>>
>> I understand that attributes can't be embedded in simpleType's and I'm
>> not really sure what the attribute is supposed to accomplish anyway. The
>> first thing I did to try and understand the problem is to remove the
>> attribute. In an XML file with the AIML targetSchema this led to the
>> error "Undefined complexType aiml:VariableName is used as a base for
>> complex type restriction." in the complexType below.
>>
>> <complexType name="SetVar">
>>
>> <simpleContent>
>>
>> <restriction base="aiml:VariableName" />
>>
>> </simpleContent>
>>
>> </complexType>
>>
>> The next step was to convert VariableName to a complexType:
>>
>> <complexType name="VariableName">
>>
>> <simpleContent>
>>
>> <restriction base="string" />
>>
>> </simpleContent>
>>
>> </complexType>
>>
>> This led to the error "Undefined complexType
>>
http://www.we.org/2001/XMLSchema:string is used as a base for complex
>> type restriction" in VariableName. In a final act of desperation I
>> replaced the attribute from the original simpleType:
>>
>> <complexType name="VariableName">
>>
>> <simpleContent>
>>
>> <restriction base="string">
>>
>> <attribute name="name" type="string" />
>>
>> </restriction>
>>
>> </simpleContent>
>>
>> </complexType>
>>
>> I'm not sure why the attribute was accepted here but it was. However, the
>> error was the same as above: Undefined complexType string.
>>
>>
>>
>> Can somebody help me with this thing? It's starting to make me a little
>> crazy...
>>
>>
>
>