K
keith
Hi, I'm new to DTDs and trying to get a DTD file to define an entity
for me, but the entity never gets defined. Looking for some insight.
Here are the files I'm working with:
-----equipment.dtd-----
<?xml version="1.0"?>
<!DOCTYPE equipment [
<!ENTITY ethernetport SYSTEM "port-ethernet.subt">
]>
-----port-ethernet.subt------
<property name="Logic Type" value="Ethernet"/>
<property name="Physical Type" value="RJ-45"/>
<property name="Hostname" value="" status="writable"/>
<property name="IP Address" value="192.168.0.0" status="writable"/>
<property name="Subnet Mask" value="255.255.255.0" status="writable"/>
-----switch.xml-------
<?xml version="1.0"?>
<!DOCTYPE equipment SYSTEM "equipment.dtd">
<equipment>
<property name="Manufacturer" value="NETWERKS"/>
<property name="Model" value="400XRS LTD"/>
<ports>
<port> ðernetport;
<property name="Port Name" value="Ethernet1"/>
</port>
<port> ðernetport;
<property name="Port Name" value="Ethernet2"/>
</port>
<port> ðernetport;
<property name="Port Name" value="Ethernet3"/>
</port>
<port> ðernetport;
<property name="Port Name" value="Ethernet4"/>
</port>
</ports>
</equipment>
When I xmllint switch.xml, xmllint complains:
<port> ðernetport;
Any ideas what I'm doing wrong?
Thanks in advance.
Keith
for me, but the entity never gets defined. Looking for some insight.
Here are the files I'm working with:
-----equipment.dtd-----
<?xml version="1.0"?>
<!DOCTYPE equipment [
<!ENTITY ethernetport SYSTEM "port-ethernet.subt">
]>
-----port-ethernet.subt------
<property name="Logic Type" value="Ethernet"/>
<property name="Physical Type" value="RJ-45"/>
<property name="Hostname" value="" status="writable"/>
<property name="IP Address" value="192.168.0.0" status="writable"/>
<property name="Subnet Mask" value="255.255.255.0" status="writable"/>
-----switch.xml-------
<?xml version="1.0"?>
<!DOCTYPE equipment SYSTEM "equipment.dtd">
<equipment>
<property name="Manufacturer" value="NETWERKS"/>
<property name="Model" value="400XRS LTD"/>
<ports>
<port> ðernetport;
<property name="Port Name" value="Ethernet1"/>
</port>
<port> ðernetport;
<property name="Port Name" value="Ethernet2"/>
</port>
<port> ðernetport;
<property name="Port Name" value="Ethernet3"/>
</port>
<port> ðernetport;
<property name="Port Name" value="Ethernet4"/>
</port>
</ports>
</equipment>
When I xmllint switch.xml, xmllint complains:
switch.xml:11: error: Entity 'ethernetport' not definedxmllint switch.xml
<port> ðernetport;
Any ideas what I'm doing wrong?
Thanks in advance.
Keith