开发者

dbUnit dtd error: The declaration for element type "dataset" must end with '>'

I work with dbUnit for the first time. I took the sample dtd from here:

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT dataset (table+) |开发者_如何学Go ANY>
<!ELEMENT table (column*, row*)>
<!ATTLIST table
    name CDATA #REQUIRED
>
<!ELEMENT column (#PCDATA)>
<!ELEMENT row (value | null | none)*>
<!ELEMENT value (#PCDATA)>
<!ELEMENT null EMPTY>

I get the following error:

org.dbunit.dataset.DataSetException: Line 2: The declaration for element type "dataset" must end with '>'.

What does that mean? I'm confused because I took the original dtd and secondly there is a '>' at the end of the dataset definition.

Thank you for your help!


Changing the first line to:

<!ELEMENT dataset (table+ | ANY)>

will make the syntax correct.

However, the model may just as well be:

<!ELEMENT dataset ANY>

as the "ANY" context specification will match table elements anyway (and more, see: http://www.w3.org/TR/xml/#sec-logical-struct)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜