Click to See Complete Forum and Search --> : Dtd(urgent)


anushreeg
October 10th, 2002, 10:49 PM
I'm having a strange problem,I have declared ID of one of my elements which takes numeric value,DTD doesn't validate my file if i give a numeric value,if i give a character instead of numeric then it works is there any way throgh which i can give a numeric value in ID.

<Switch ID="HICOMSwitch" MediaType="Voice" SwitchType="HICOM400">
<!-- Following is already present in Application 'Switch' object
MediaConnector ID="T-Server" -->
<Links>
<ApplicationRef name="T-Server"/>
</Links>
<DNs>
<DN ID="DN1" Alias="Alias1">
<Links>
<SwitchRef ID="HICOMSwitch"/>
</Links>
</DN>

</Switch>

in the above when i give DN ID="1002",DTD gives an error that starting with an invalid character.
anticipating your earliest reply.
thanks
Anushree:(

anushreeg
April 17th, 2003, 06:22 AM
no there is no way in which you can give a numeric value in place of an ID,in DTDs specifications it is written that in it ID field should always be alphanumeric.

VmusicV
May 13th, 2003, 10:07 AM
You can use a identity constraint on elements.

ID and IDREF were old carry overs from DTD... newer schema designs allow or have integrity constraints.