Martin
Thanks for your reply. I am developing using Visual Studio .NET 2003. I'm
working within the XML designer.
You are right about the mixed up IDs but actually the xml I pasted here is
an edited subset of my data. The real file respects ID uniqueness, so that's
not the issue. But thanks for the point on not using xs:ID for elements.
The errors I get when I ask the designer to validate the file are all "Could
not find schema information for the element
'http://www.w3.org/1999/xhtml:b'" and similar for the other elements within
the Content node.
Hope you can see some sense in it. I will email you the full file if you
don't mind.
TIA
Wole
"Martin Honnen" <mahotrash@yahoo.de> wrote in message
news:41a9c039$0$29846$9b4e6d93@newsread2.arcor-online.net...[color=blue]
>
>
> Wole Ogunremi wrote:
>
>[color=green]
>> I'm putting a forum together allowing xhtml markup content. I am
>> validating
>> against a schema but getting "Could not find schema information for
>> element
>> <elementName>...
>>
>> I would appreciate if anyone could advice where I am going wrong. TIA[/color]
>
> Well how are you validating that document? Which XML parser are you using,
> how are you using it?
> When I save your files here locally and use the following JScript to
> validate with MSXML 5 or MSXML 4
>
> var xmlSchemaCache = new ActiveXObject('Msxml2.XMLSchemaCache.5.0');
> xmlSchemaCache.add('http://www.test.com/Topics.xsd',
> 'test2004112801Xsd.xml');
>
> var xmlDocument = new ActiveXObject('Msxml2.DOMDocument.5.0');
> xmlDocument.schemas = xmlSchemaCache;
>
> xmlDocument.async = false;
> var valid = xmlDocument.load('test2004112801.xml');
>
> then I get an error message
> 'Die ID 'thrd6' kommt doppelt vor.'
> meaning the ID 'thrd6' is duplicated. And indeed looking into your
> instance you have:
>
>
>[color=green]
>> <tes:SubThread ParentThreadID="thrd5">
>> <tes:ThreadID>thrd6</tes:ThreadID>
>> <tes:AuthorID>Anonymous</tes:AuthorID>
>> <tes:Created>
>> <tes:OnDate>2004-11-27</tes:OnDate>
>> <tes:AtTime>14:46:11</tes:AtTime>
>> </tes:Created>[/color]
>
>[color=green]
>> <tes:SubThread ParentThreadID="thrd5">
>> <tes:ThreadID>thrd6</tes:ThreadID>
>> <tes:AuthorID>Anonymous</tes:AuthorID>
>> <tes:Created>
>> <tes:OnDate>2004-11-27</tes:OnDate>
>> <tes:AtTime>15:12:06</tes:AtTime>
>> </tes:Created>[/color]
>
> so that instance is not valid.
>
> Also note that you shouldn't use the type xs:ID for element values, it
> should only be used on attribute values to be compatible with the XML 1.0
> specification and the XML DTD type ID. You can use xs:unique or xs:key to
> define such element values as unique.
>
>
>
> --
>
> Martin Honnen
>
http://JavaScript.FAQTs.com/[/color]