[fpc-pascal] XML_XSD export was: Timezone information in a datasetdatetimefield?

Ludo Brands ludo.brands at free.fr
Mon Jul 25 18:49:29 CEST 2011


> 
> In the meantime, I've finished the ADO.Net export functionality.
> 
> I'd appreciate further test reports!
>

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




More information about the fpc-pascal mailing list