XML Schema notation అంశం
నిర్వచనం మరియు వినియోగం
notation అంశం నోటేషన్ మెమ్బర్షిప్ ఎక్స్టెన్షన్స్ అనేది XML పత్రంలో నాన్-XML డాటా ఫార్మాట్ నిర్వచిస్తుంది.
అంశ సమాచారం
కనబడే సంఖ్యలు | నిరాకరణ |
పైరుపుట్టిన అంశం | schema |
కంటెంట్ | annotation |
వినియోగం
<notation id=ID name=NCName public=anyURI system=anyURI ఏదైనా అంశాలు > (annotation?) </notation>
(? సింబోల్ నోటేషన్ అంతర్గతంలో ఈ అంశం కనబడవచ్చు లేదా ఒకసారి మాత్రమే కనబడవచ్చు.)
అంశం | వివరణ |
---|---|
id | ఎంపికమైనది. ఈ అంశానికి ప్రత్యేకమైన ID నిర్ధారించుతుంది. |
name | అనివార్యం. అంశానికి పేరును నిర్ధారించుతుంది. |
public | అనివార్యం. public సూచకంతో ప్రత్యర్థంగా ఉన్న URI నిర్ధారించుతుంది. |
system | system సూచకంతో ప్రత్యర్థంగా ఉన్న URI మరియుపరిణామం. |
ఏదైనా అంశాలు | ఎంపికమైనది. non-schema నామస్థలం కలిగిన ఏదైనా ఇతర అంశాలను నిర్ధారించుతుంది. |
ఉదాహరణ
ఉదాహరణ 1
ఈ ఉదాహరణలో view.exe ప్రదర్శకం ద్వారా gif మరియు jpeg ఫార్మాట్లు చూపించబడతాయి:
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:notation name="gif" public="image/gif" system="view.exe"/> <xs:notation name="jpeg" public="image/jpeg" system="view.exe"/> <xs:element name="image"> <xs:complexType> <xs:simpleContent> <xs:attribute name="type"> <xs:simpleType> <xs:restriction base="xs:NOTATION"> <xs:enumeration value="gif"/> <xs:enumeration value="jpeg"/> <xs:restriction> </xs:simpleType> </xs:attribute> </xs:simpleContent> </xs:complexType> </xs:element> </xs:schema>
文档中的 "image" 元素是这样的:
<image type="gif"></image>