V
vjethava
Hi,
I'm relatively new to xml. I want to have a xml element of the form:
<!ELEMENT CAR (MAKE, COMPANY)>
<!ATTLIST CAR
TYPE PCDATA
PRICE PCADATA>
<!ELEMENT COMPANY (HQ, COMPANY_TYPE)>
Is there a way such that CAR/TYPE has the same value as
CAR/COMPANY/COMPANY_TYPE either using DTD or a schema . For example,
whenever,
CAR/COMPANY/COMPANY_TYPE = "PRICEY"
then,
CAR/TYPE = "PRICEY"
I think something like XPath is needed but am not sure how to go about
getting this. Can I use XPath inside XML elements to point to value of
other elements.
Vinay
I'm relatively new to xml. I want to have a xml element of the form:
<!ELEMENT CAR (MAKE, COMPANY)>
<!ATTLIST CAR
TYPE PCDATA
PRICE PCADATA>
<!ELEMENT COMPANY (HQ, COMPANY_TYPE)>
Is there a way such that CAR/TYPE has the same value as
CAR/COMPANY/COMPANY_TYPE either using DTD or a schema . For example,
whenever,
CAR/COMPANY/COMPANY_TYPE = "PRICEY"
then,
CAR/TYPE = "PRICEY"
I think something like XPath is needed but am not sure how to go about
getting this. Can I use XPath inside XML elements to point to value of
other elements.
Vinay