Link to home
Start Free TrialLog in
Avatar of mredfelix
mredfelix

asked on

XML Context free grammar

I want to know how to describe XML in the form of a Grammar.  I am not sure if it is a COntext free Grammar or a meta Grammar.  I need to know the specfication for an XMl Context free gammar.
Avatar of BigRat
BigRat
Flag of France image

Go and fetch the document http://www.w3.org/TR/REC-xml and extract the syntax rules like :-

[45]    elementdecl    ::=    '<!ELEMENT' S Name S contentspec S? '>' [VC: Unique Element Type Declaration]
[46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children  


and voilà! you have a grammar for XML.

HTH
Avatar of mredfelix
mredfelix

ASKER

can u explaine to me the termnology of the examples u have given me so i can learn how to read them
ASKER CERTIFIED SOLUTION
Avatar of BigRat
BigRat
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial