James Clark wrote:
> - trang has an XML input module that infers schemas (this was written
I am very happy, of course, to see your inference module. I have been having
mostly good results, except with DTD output. In certain instances, the DTD
generator truncates.
Two examples:
C:\XML\Rng\Examples>cat record.xml
<Record transactionID="MSG-2001-12-01-00001">
<Date>2001-12-01</Date>
<Partner type="DUNS">86-757-8317</Partner>
<ProductID type="ISBN">1-887309-04-7</ProductID>
<Shipping vendor="FedEx">Overnight</Shipping>
<Comments>None.</Comments>
</Record>
C:\XML\Rng\Examples>java -jar \lib\trang.jar record.xml record.dtd
C:\XML\Rng\Examples>cat record.dtd
<?xml encoding="UTF-8"?>
<!ELEMENT Record (Date,Partner,ProductID,Shipping,Comments)>
<!ATTLIST Record
xmlns CDATA #FIXED ''
transactionID #REQUIRED>
And:
C:\XML\Rng\Examples>cat order.xml
<Order>
<Date>2001-12-01</Date>
<Item>book</Item>
<What>who?</What>
</Order>
C:\XML\Rng\Examples>java -jar \lib\trang.jar order.xml order.dtd
C:\XML\Rng\Examples>cat order.dtd
<?xml encoding="UTF-8"?>
<!ELEMENT Order (Date,Item,What)>
<!ATTLIST Order
xmlns CDATA #FIXED ''>
Mike