[fpc-pascal] XML_XSD export was: Timezone information inadatasetdatetimefield?

Ludo Brands ludo.brands at free.fr
Tue Jul 26 10:20:04 CEST 2011


Did some further testing. Adding sequence wasn't necessary. <xs:element
name="table"> parenting to <xs:choice maxOccurs="unbounded" minOccurs="0">
instead of <xs:complexType> is the right solution. This corresponds also
with your ADO.Net sample.

Patch attached.

Ludo

> 
> Attached the patch with the changes against git.
> 
> Ludo
> 
> > I'm getting an "http://www.w3.org/2001/XMLSchema:element not
> > taken into account in this context" (freely translated from 
> > French) error. Fixed this by adding <xs:sequence> between 
> > <xs:complexType> and <xs:choice maxOccurs="unbounded" 
> minOccurs="0"/>
> > 
> > One other comment on indices:
> > 
> > Line 244:
> >             if Index.Name = '' then
> >             begin
> >               TDOMElement(FANode).SetAttribute('index-name',
> >                 UTF8Decode('idx' + Index.Fields +
> > IntToStr(Index.ID)));
> >               //Avoids risk for name collision by adding 
> > collection id.
> >             End
> > 
> > Index.Fields contains ; as a field delimiter. AFAIAK ; is an
> > invalid character in index names. Better do a 
> > StringReplace(Index.Fields, ';', '_', [rfReplaceAll, rfIgnoreCase])
> > 
> > Ludo
> > 
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlxsd.diff
Type: application/octet-stream
Size: 446 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110726/a2d9e8c5/attachment.obj>


More information about the fpc-pascal mailing list