[Download-List] Help with XML format of non-associated multivalued field

David L. Rotman rotmand at cedarville.edu
Fri Feb 13 07:43:30 EST 2004


Starting with DOWNLOAD version 7.00, an association name
is generated if none is present in the dictionary.  This will let
your paragraph run, but still not generate the results
you want.

The output:
<contact>
  <id>12304</id>
  <detail>
    <contactdetail>Some text</contactdetail>
    <contactdetail>some more text</contactdetail>
    <contactdetail>even more text</contactdetail>
    <contactdetail>the last line</contactdetail>
  </detail>
</contact>
makes sense in your situation, but it seems to be a
degenerate case.  If the data were more involved,
such as a date and comment, you would likely
want a different structure:
<contact>
  <id>12304</id>
  <detail xnum="1">
      <date>05/12/2003</date>
      <comment>some text</comment>
  </detail>
  <detail xnum="2">
      <date>12/14/2003</date>
      <comment>more text here</comment>
  </detail>
</contact>


It appears that both styles are acceptable for XML.
I'd welcome comments  on this.  I'll consider adding
this capability to DOWNLOAD...your comments
would influence how this is accomplished.  (What
would you call the degenerate case?)





Dave Rotman
Director of Computer Services
Cedarville University
251 N. Main Street
Cedarville, OH 45314
rotmand at cedarville.edu
voice 937-766-7905
fax 937-766-8819

>>> Wendy.Smoak at asu.edu 2/12/2004 5:13:53 PM >>>

DOWNLOAD seems to be insisting on an association for every multivalued
field.

XML association name "" (field "CONTACT.DETAIL") does not generate a
valid XML name.

CONTACT.DETAIL is multivalued, but it's just lines of text, the values
are not associated to any other field.  I need to get output like
this:

<?xml version="1.0"?>
<download>
<contact>
  <id>12304</id>
  <detail>
    <contactdetail>Some text</contactdetail>
    <contactdetail>some more text</contactdetail>
    <contactdetail>even more text</contactdetail>
    <contactdetail>the last line</contactdetail>
  </detail>
</contact>
</download>

Instead, this is as close as I've been able to come:

>DOWNLOAD CONTACT @ID CONTACT.DETAIL MULTI.VALUE NUM.VALUES ALL
XML.ASSOC.NAME '
detail' FORMAT XML
DOWNLOAD version 6.02
Using input file CONTACT
Output to screen

<?xml version="1.0"?>
<download>
<contact>
  <id>12304</id>
  <detail>
    <contactdetail>Some text</contactdetail>
  </detail>
  <detail>
    <contactdetail>some more text</contactdetail>
  </detail>
  <detail>
    <contactdetail>even more text</contactdetail>
  </detail>
  <detail>
    <contactdetail>the last line</contactdetail>
  </detail>
</contact>
</download>

Is there a way to make that happen?  Some way to tell DOWNLOAD that
not
all multivalued fields are associated?

If not... I'm thinking an I-Descriptor that swaps in a space for the
value mark, so it comes out as one big block of text.  Any other
ideas?
People do try to format "paragraphs" within this field, but we try to
discourage them.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 
_______________________________________________
download-list mailing list
download-list at cedarville.edu 
http://mail.cedarville.edu/mailman/listinfo/download-list



More information about the download-list mailing list