<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.2106.6"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000 size=2><FONT size=3>Hello All,</FONT></FONT></DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3>I am in the process of BETTERING an XML-DTD I
made.</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3>
In the process of making it compact, I decided to encapsulate all the
repeated(in the DTD) attribute definations of elements in parameter entities,
and use para. entity refrences in places where the attr. defs. are
repeated.</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3>
But, all the repeated attributes I want to add to my parameter entity
have #FIXED and DIFFERENT values at all the places they are repeated
at, as a result of which I am not being able to add them to the para.
entity replacement text even though they are repeated.</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3>Let me explain my problem with an
example.</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3>I have the following 2 element declarations :-</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3><!ELEMENT ele1 (#PCDATA)></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3><!ATTLIST ele1 </FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3>
common-attr CDATA #FIXED "common-attr-value1"></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3><!ELEMENT ele2 (#PCDATA)></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3><!ATTLIST ele2 </FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3>
common-attr CDATA #FIXED
"common-attr-value2"></FONT></FONT></DIV></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3>Since both the elements have AN ALMOST SIMILAR attribute
'common-att' (except the #FIXED values) I want to encapsulate the common-attr
attribute defination in a parameter entity and refrence the para. entity at
points where I want to add the common-attr defination, so that my DTD would
loook like :-</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3>
< !ENTITY %attr-def 'common-attr CDATA #FIXED
".................."
'> </FONT>
</FONT></DIV></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000
size=2>
|</FONT></DIV>
<DIV><FONT color=#000000
size=2>
|</FONT></DIV>
<DIV><FONT color=#000000
size=2>
\ /</FONT></DIV>
<DIV><FONT color=#000000
size=2>
What to write here </FONT></DIV>
<DIV> </DIV>
<DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3><!ELEMENT ele1 (#PCDATA)></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3><!ATTLIST %attr-def; </FONT></FONT><FONT color=#000000
size=2><FONT size=3>></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3><!ELEMENT ele2 (#PCDATA)></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3><!ATTLIST ele2 %attr-def;</FONT></FONT><FONT color=#000000
size=2><FONT size=3>></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV>But the problem of using a parameter refrence here is that the attribute
'common-attr' has different #FIXED values at both the places it is
used so a simple refrence like %attr-def; will not give it the required #FIXED
values it requires.</DIV>
<DIV> </DIV>
<DIV>Concerning this issue I have 3 questions :-</DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2><FONT size=3>1. </FONT> <FONT
size=3>Whether encapsulating the attribute common-attr in a para. refrence is
proper or not even though the attribute is NOT exactly similar in both places it
is used?</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000 size=2><FONT size=3>(I feel it is correct,since the
attribute definations at both the places differ only in their VALUE , nothing
else!)</FONT></FONT></DIV>
<DIV> </DIV>
<DIV>2. Is there way to pass #FIXED values of SAME parameter definations through
their entity refrences(something like parameter passing)? eg. </DIV>
<DIV> </DIV>
<DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3><!ELEMENT ele1 (#PCDATA)></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3><!ATTLIST ele1 %attr-def(/*-------pass fixed value
here--------*/); </FONT></FONT><FONT color=#000000 size=2><FONT
size=3>></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3><!ELEMENT ele2 (#PCDATA)></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3><!ATTLIST ele2 %attr-def(/*-------pass fixed value
here--------*/);</FONT></FONT><FONT color=#000000 size=2><FONT
size=3>></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV>3. Is there any way I can add attributes like 'common-attr'(used in the eg.
above) to a para. entity and only call its refrence in places it is needed in
the DTD making sure that at each calling place a unique #FIXED value is
passed?</DIV></DIV></DIV></DIV></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3>Thanx in advance,</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT></FONT> </DIV>
<DIV><FONT color=#000000
size=2>
<FONT size=3>AMIT REKHI</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT size=3></FONT><FONT
size=3>
Software Engineer,</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3>A.B.Infosys.P.Ltd,</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3></FONT>
<FONT size=3>New Delhi </FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3>
INDIA.</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT
size=3> </FONT></FONT></DIV></BODY></HTML>