LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject: Re: Data Types
From: Steve Neely <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Tue, 4 Dec 2007 15:42:06 +0000
Content-Type:text/plain
Parts/Attachments:
Parts/Attachments

text/plain (129 lines)


It sounds like you are asking something different to what I originally
thought.

Are you writing XML to be parsed by a processor which produces an ESRI
shapefile? If so, the mapping of which XML elements become which fields
in your attribute table would be specific to that processor. I guess
it'll be in the documentation.

Or are you are writing _/the processor/_ to generate ESRI shapefiles
from some XML? In which case you can technically define any mapping you
want.

Steve


Ron Leach wrote:
> Thanks for the reply Steve.
>
> This data will be exported to an ESRI shapefile so I really need the data to
> be typed in a specific manner.
>
> In the sample I provided below, I can declare the string data type as
> follows: 
> <string length ="5" ... />.  This in turn when I get to the ESRI shapefile
> gives me a field in an attribute table that is a text field with a length of
> 5.  So, I need, for example, to declare <double ???? ... /> so when I get to
> the ESRI shapefile I will have a field in my attribute table that is the
> double data type with precision of 12 and scale of 8.
>
> How do I declare these (double, short & long) data types?  Will it be
> similar to the string declaration?
>
> Thanks again.
>
> Ron 
>
> -----Original Message-----
> From: General discussion of Extensible Markup Language
> [mailto:[log in to unmask]] On Behalf Of Steve Neely
> Sent: Tuesday, December 04, 2007 8:58 AM
> To: [log in to unmask]
> Subject: Re: Data Types
>
> Hi Ron,
>
> You don't actually declare types in XML. If you want to constrain the
> XML data with types you would use one of the schema languages, such as
> XML schema, RELAX NG or a DTD in the old days.
>
> One of the core benefits of XML is to allow data to evolve without being
> bound by an explicit schema so these are not mandatory.
>
> This article might be a good reading point
> http://www.xml.com/pub/a/2001/12/12/schemacompare.html
>
> Steve
>
>
> Ron Leach wrote:
>   
>> Hello, 
>>
>>  
>>
>> I am new to XML.  I need to use the double, short integer and long integer
>> data types.  How do I declare those?  I can declare the string data type
>>     
> but
>   
>> I do not know how to declare a double, short integer or long integer. 
>>
>>  
>>
>> Below is a sample of what I am working with. 
>>
>>  
>>
>> <spec>
>>
>>  <author name="" />
>>
>>  <designation name="" />
>>
>>  <acronym name="" />
>>
>>  <product_scale val="0" />
>>
>> <class id="1" name="CEF_Notes" >
>>
>>  <polygon width="4" fg="(255,0,0)" style="SOLID" />
>>
>>  <string length="5" name="Id" mask="0" default="&quot;&quot;" />
>>
>>  <string length="32" name="IMG_SOURCE" mask="0" default="&quot;&quot;" />
>>
>>  <string length="8" name="IMAGE_DATE" mask="0" default="&quot;&quot;" />
>>
>>  <string length="20" name="LAT_DD" mask="0" default="&quot;&quot;" />
>>
>>  <string length="20" name="LON_DD" mask="0" default="&quot;&quot;" />
>>
>>  <string length="5" name="FEATURE" mask="0" default="&quot;&quot;" />
>>
>>  <domain type="enum" name="ATTRIBUTE" mask="0" >
>>
>>  <member value="0" name="SHORELINE Man-made.Bulkhead Or Sea Wall" />
>>
>>  <member value="1" name="SHORELINE Man-made.Bulkhead Or Sea Wall.Ruins" />
>>
>>  <member value="2" name="SHORELINE Man-made.Canal.Navigable" />
>>
>> </domain> 
>>
>> </class>
>>
>> </spec>   
>>
>>  
>>
>> Thanks in advance.
>>
>>  
>>
>> Ron
>>
>>   
>>     
>
>   

Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager