xml DTD correctness, why would we use round braces inside of round braces when declaring XML node? -
i'm looking @ piece of xml (inside of dtd file):
<!element entry ((node1?, node2?, node3?), node4, node5?, (node6 | node16)?, (node17, node18?, (node19, node20)?)*, node21?, node22?, node23*, node24*, ((node25) | (node26?, node27?))?, node28*, node29?, node30*, node31*)>
what reasoning behind having (node1?, node2?, node3?)
in round braces? mean node1 , node2 , node3 optional? -> aren't alreday optional fact have question mark added already?
parentheses used grouping. grouping lets put qualifiers on parts of patterns, (node6 | node16)?
, or control precedence, (node25) | (node26?, node27?)
. in case of (node1?, node2?, node3?)
, parentheses redundant. means same thing node1?, node2?, node3?
.
sometimes people add parentheses because think makes things easier read, or emphasize related pieces of pattern. people type no reason.
Comments
Post a Comment