Advertisements

I'm working in a departement writing technical documentation. The
requirement I was given is to create a kind of quality control tool
that will ensure the various possibilities of the DTD are covered by
another document, called a layout (not related to XSL), that will
display the data (which is SGML, not XML) in a printable way. My boss
wanted to be sure we have not forgotten any possibility, or for the
ones that are not covered, somebody will have to confirm there is
nothing to print.

The DTD in the example shall have been something like
<!ELEMENT A (#PCDATA, B, C)>
<!ELEMENT B (#PCDATA, C)>
<!ELEMENT C (#PCDATA) >

If our layout says it supports
A
C (general C)
B/C (C under a B element)

My boss wants to know the pcdata under B is not supported. He also
wants to know that C is supported in two places.

Thank you

Bernard

"Dennis E. Hamilton" <> wrote in message news:<>...
> Well, first, if you mean only the valid cases, without concern for #PCDATA,
> you would only have (for root element <A>)
>
> <A><B><C></C></B><C></C></A>
>
> That is, there is only one valid structure for the given DTD.
>
> So I can't tell what you are really looking for.
>
> Maybe you meant <!ELEMENT A (B | C)> ?
>
> Then your last two examples are the only valid cases.
>
> How do you intend to deal with elements that are recursively defined?
>
> It might be good to stand back a little and consider the problem you are
> trying to solve that enumerating all of the valid structures is a solution.
>
> -- orcmid
>

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!