How to use namespaces and DTDs

admin

Administrator
Staff member
Hi, I am wanting to create a DTD for an XML document which uses a namespaceand I am wondering on the best way of defining the DTD, what I have uptonow (which validates properly) is something along these lines:DTD:<!ELEMENT analy:analyser (analy:groups)?><!ATTLIST analy:analyser xmlns:analy CDATA #IMPLIED><!ELEMENT analy:groups (#PCDATA)>XML:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE analy:analyser PUBLIC "-//FOO//DTD FOO 1.0//EN""analyser.dtd"><analy:analyser xmlns:analy="http://www.foo.com/analyser/"><analy:project/></analy:analyser>Now as I said, this does validate correctly but it does mean that the namespaceis very much set in stone (this may or may not be a bad thing) but it alsolooks quite ugly, is there an easier way of doing this?Cheers, Mat.
 
Back
Top