Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newby DTD problem

Status
Not open for further replies.

shakaman

Technical User
Apr 11, 2002
1
IE
Hi all,

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

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

I am checking it's XML content and validity using the following &quot;external DTD&quot;


<?xml version=&quot;1.0&quot;?>
<!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 &quot;(SS | SC | SA | CA)&quot;
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

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

<swftmessagefx>&quot;

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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top