SunQuest
           XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML 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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 7th, 2003, 10:30 AM
cfields cfields is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Buffalo, NY
Posts: 3 cfields User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Required Tags Disappear??

OK I am newbie to XML but not to programming. I was assigned the task of trying to develop some why for my company to file UCC's for NY State through an automated XML filing system (of course figuring out XML first ).

Here is a link to their DTD --> URL

I decided to use XML Spy as it seemed relatively easy to figure out plus I could create a stylesheet so that they people that are going to use this could easily imput data without having to know anything about XML (this is really a must).

Anyways I got everything created OK, or so I thought, as the filings are basically split into 2 sections (1) Header and (2) Record(s).

If I just do 1 record for one file, everything goes as planned but if I try to put more than one record in one file, it seems as if mandatory tags are not copied to the new record. Basically the <OrganizationName> does not show up on the 2nd Record unless I input it. This poses a problem as there will be parts of the DTD that is not entered such as <FileInRealEstate> but as it includes the <Names> tag which should include <OrganizationName> but it leaves that tag out which causes this XML file to be invalid.

Has anyone run across this? I am sure I did something wrong but as I have not ever done this before I am not sure where to look.

Reply With Quote
  #2  
Old July 7th, 2003, 12:11 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Can you post 1: some sample input, 2: your xsl stylesheet, and 3: some sample output so we can see what's not working right?

Reply With Quote
  #3  
Old July 8th, 2003, 08:14 AM
cfields cfields is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Buffalo, NY
Posts: 3 cfields User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for you help and I will attach a zip file to save some space on here that includes the following files:

stylesheet.sps --> the stylesheet
good.xml --> a valid version of the xml document
bad.xml --> this is what good.xml looked like before I went in a made the changes manually to get it to work right.

Not every field has to be filled in which is part of the problem. I was going to try to do a workaround and put the fields that will not be filled in (like FillInRealEstate) at the bottom of the style sheet so that they can put a blank line in there and then I am hoping it will include <OrganizationName>.

Anyways, thanks for trying to help me out. The DTD is on the internet if you want to see it.
Attached Files
File Type: zip xml_help.zip (7.4 KB, 296 views)

Last edited by cfields : July 8th, 2003 at 09:12 AM.

Reply With Quote
  #4  
Old July 8th, 2003, 11:50 AM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Well, first off, I've never used XMLSpy, so I'm guessing that the .sps file you sent generates a form that people can enter data into and then have that data magically spit out as XML?

I noticed a few things about the .sps file, though. First, I can't find anywhere that you're generating an AuthDebtor tag. This suggests that maybe the .sps file is grabbing an empty value out of the .dtd or something.

Second, you've got two templates that are doing almost identical operations on the Record tag. The structure looks something like this:
Code:
<template>
   <template (matches Document)>
      <template (matches Record)/>
   </template>
   <template (matches Record)/>
</template>

This would seem to me that you're generating two snippets of XML for every set of data entered. Either that, or the first record you enter is getting processed by the first template, and subsequent records are getting processed by the second. That would explain the data discrepancy.

Also, what it appears is happening with your data is that since no values are being entered in the form, XMLSpy is just outputting an empty tag. That would mean it's leaving off any empty child tags as well.

You want to go ask your question here: http://www.altova.com/forum/forums/forum.asp?forumid=26 I would assume they'd be able to give you more targetted help with this.

Reply With Quote
  #5  
Old July 8th, 2003, 12:04 PM
cfields cfields is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Buffalo, NY
Posts: 3 cfields User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok thanks for your help..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Required Tags Disappear??


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway