W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2003

DTD and namespaces

From: Rob Anderson <roba@bml.uk.com>
Date: Fri, 10 Oct 2003 10:50:26 +0100
To: <xmlschema-dev@w3.org>

I am trying (very) to find a solution for including (importing) another
(svg) DTD into another that gives me a namespace prefix for each of the
imported elements.

Want the DTD to refer to the that fact that svg can exist within an element,
anf that it needs to be part of the svg namespace, preferably with a
namespace prefix.

A valid XML would look like: -

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ProofOfDelivery SYSTEM "test.dtd">
<ProofOfDelivery xmlns:svg="http://www.w3.org/2000/svg">
			<svg:svg width="212" height="40">
				<svg:g style="fill:none; stroke:black; stroke-width:3">
					<svg:line x1="39" y1="10" x2="41" y2="9"/>

I would like, if possible a DTD for this

My put on the DTD is...

<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % svg.dtd PUBLIC "-//W3C//DTD SVG 20010904//EN"
<!ELEMENT ProofOfDelivery (Version, ReceivedBy)>
<!ATTLIST ProofOfDelivery
	xmlns:svg CDATA #FIXED "http://www.w3.org/2000/svg"
<!ELEMENT ReceivedBy (Graphic)>
<!ELEMENT Graphic (#PCDATA)*>
<!ELEMENT Version (#PCDATA)>

My problem is how do I tell the Graphic element that it can contain an
<svg:svg> element???

Received on Friday, 10 October 2003 06:01:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC