XML 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 - 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:
  #1  
Old April 11th, 2002, 06:51 AM
shakaman shakaman is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 1 shakaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Newby DTD problem

Hi all,

I'm relatively new to XML and have this XML document...

<?xml version="1.0" encoding="ISO8859-1" ?>
<!DOCTYPE swiftmessagefx SYSTEM "A:/Extxml/DTD/swiftmessagefx.dtd" >
<swiftmessagefx>
<fx20 adr="CS3434675217"></fx20>
<fx30 no="023104"></fx30>
<fx31P org="023101"></fx31P>
<fx32B pce="EUR19753.13"></fx32B>
<fx32M commls="EUR18375.00"></fx32M>
<fx33F pu="EUR12.25"></fx33F>
<fx35A typ="SA" unit="1500"></fx35A>
<fx35B ISIN="DL9665213487" stckrf="MUNICH AIRLINES"></fx35B>
<fx71F comm="EUR1378.13"></fx71F>
<fx82D trad="J.P. MORGAN INVESTMENT MGT"></fx82D>
<fx83D code="13401" fund="GLOMAR US GROWTH FUND"></fx83D>
<fx85D sett="/AFIN/01028"></fx85D>
CREDIT SUISSE
<fx87D brok="/AFIN/01028"></fx87D>
CREDIT SUISSE
</swiftmessagefx>

I am checking it's XML content and validity using the following "external DTD"


<?xml version="1.0"?>
<!ELEMENT swiftmessagefx (fx20, fx30, fx31P, fx32B, fx32M, fx33T, fx35A, fx35B, fx71F, fx82D, fx83D, fx85D, fx87D)>
<!ELEMENT fx20 (adr)>
<!ELEMENT fx30 (no)>
<!ELEMENT fx31P (org)>
<!ELEMENT fx32B (pce)>
<!ELEMENT fx32M (commls)>
<!ELEMENT fx33T (ppu)>
<!ELEMENT fx35A (typ, unit)>
<!ELEMENT fx35B (ISIN, stckrf)>
<!ELEMENT fx71F (comm)>
<!ELEMENT fx82D (trad)>
<!ELEMENT fx83D (code, fund)>
<!ELEMENT fx85D (sett)>
<!ELEMENT fx87D (brok)>

<!ATTLIST fx20 adr NMTOKEN #REQUIRED>
<!ATTLIST fx30 no NMTOKEN #REQUIRED>
<!ATTLIST fx31P org NMTOKEN #REQUIRED>
<!ATTLIST fx32B pce NMTOKEN #REQUIRED>
<!ATTLIST fx32M commls NMTOKEN #REQUIRED>
<!ATTLIST fx33T ppu NMTOKEN #REQUIRED>
<!ATTLIST fx35A typ NMTOKEN "(SS | SC | SA | CA)"
unit NMTOKEN #REQUIRED>
<!ATTLIST fx35B ISIN NMTOKEN #REQUIRED
stckrf NMTOKEN #REQUIRED>
<!ATTLIST fx71F comm NMTOKEN #REQUIRED>
<!ATTLIST fx82D trad NMTOKEN #REQUIRED>
<!ATTLIST fx83D code NMTOKEN #REQUIRED
fund NMTOKEN #REQUIRED>
<!ATTLIST fx85D sett NMTOKEN #REQUIRED>
<!ATTLIST fx87D brok NMTOKEN #REQUIRED>

And my browser is throwing back this error message

"Error in default attribute value defined in DTD/Schema. A name contained an invalid character. Line 3, Position 1

<swftmessagefx>"

And for the life of me I can't figure out what's wrong with my DTD.....swiftmessagefx is the root element with 13 children, which in turn have attributes associated with them.

I'd appreciate any help anybody can give

Shak

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Newby DTD problem

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