Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 12th, 2004, 03:15 PM
garbz garbz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 garbz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question XMLMapper - TClientDataSet - Empty Fields

Kylix 3 Enterprise Trial
Iīm using TXMLTransformProvider and TClientDataSet.
With then XML Mapper I generate the transformation files ToDP.xtr and ToXml.xtr based on a dtd that starts like this:

<!ELEMENT DOMINIO (FORMA*)>
<!ATTLIST DOMINIO
identifica ID #REQUIRED
titulo CDATA #REQUIRED
autor CDATA #IMPLIED
version CDATA #IMPLIED>

<!ELEMENT FORMA (ATRIBUTO*)>
<!ATTLIST FORMA
alias ID #REQUIRED
titulo CDATA #REQUIRED
descripcion CDATA #IMPLIED>

....
This way I can access the alias attribute of every FORMA element.
But if change the DTD to this and generate the transformation files again:

<!ELEMENT DOMINIO (FORMA*)>
<!ATTLIST DOMINIO
identifica ID #REQUIRED
titulo CDATA #REQUIRED
autor CDATA #IMPLIED
version CDATA #IMPLIED>

<!ELEMENT FORMA (ATRIBUTO*, IDENTIFICADOR*)>
<!ATTLIST FORMA
alias ID #REQUIRED
titulo CDATA #REQUIRED
descripcion CDATA #IMPLIED>
...

the TClientDataSet I use for the FORMA elements fills only the alias of the first FORMA element and the rest of them have NULL value.

The xml file for the tests is something like this:

<DOMINIO autor="" titulo="Diagrama principal de dominio" version="" identifica="DomPrincipal">
<FORMA alias="EDF" titulo="Edificio">
<ATRIBUTO nombre="EDF_Nombre" titulo="Nombre" tipo="varchar(40)" obligatoriedad="si"/>
<ATRIBUTO nombre="EDF_TMPunit" titulo="Tasa Mensual Punitoria" tipo="decimal(5,2)" obligatoriedad="si"/>
<ATRIBUTO nombre="EDF_TMResarcit" titulo="Tasa Mensual Resarcitoria" tipo="decimal(5,2)" obligatoriedad="si"/>
<ATRIBUTO nombre="EDF_DispOrd" titulo="Disponible Ordinarios" tipo="decimal(12,2)" obligatoriedad="si"/>
<ATRIBUTO nombre="EDF_DispExtra" titulo="Disponible Extraordinarios" tipo="decimal(12,2)" obligatoriedad="si"/>
<ATRIBUTO nombre="EDF_InicioAdm" titulo="Inicio Administracion" tipo="date" obligatoriedad="si"/>
<ATRIBUTO nombre="EDF_FormaPM" titulo="Forma Penalizar Moras" tipo="tinyint" obligatoriedad="si"/>
<ATRIBUTO nombre="EDF_DGExtra" titulo="Distribucion Gastos Extraordinarios" tipo="tinyint" obligatoriedad="si"/>
</FORMA>

<FORMA alias="TDP" titulo="Tipo de Propiedad">
<ATRIBUTO nombre="TDP_Designacion" titulo="Designacion" tipo="varchar(25)" obligatoriedad="si"/>
<ATRIBUTO nombre="TDP_PropEdif" titulo="Proporcion Edificio" tipo="decimal(5,3)" obligatoriedad="si"/>
</FORMA>
....

Donīt know what is the problem.
I could send the files.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > XMLMapper - TClientDataSet - Empty Fields

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap