-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #688 from tefra/dtd
Implement DTD code generator
- Loading branch information
Showing
27 changed files
with
1,248 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[bandit] | ||
exclude: tests/,docs/ | ||
skips: B701 | ||
skips: B701,B410 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
============ | ||
DTD Modeling | ||
============ | ||
|
||
The code generator supports processing external document type definitions (DTD). | ||
|
||
.. code-block:: console | ||
$ xsdata --package tests.fixtures.dtd.models tests/fixtures/dtd/complete_example.dtd | ||
.. tab:: DTD Definition | ||
|
||
.. literalinclude:: /../tests/fixtures/dtd/complete_example.dtd | ||
:language: dtd | ||
|
||
.. tab:: Output | ||
|
||
.. literalinclude:: /../tests/fixtures/dtd/models/complete_example.py | ||
:language: python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DTDParseError: error parsing DTD | ||
================================ | ||
|
||
xsdata works only with **external** document type definitions | ||
and relies on `lxml <https://lxml.de/>`_ exclusively to parse | ||
the dtd tree. | ||
|
||
Try to remove the `DOCTYPE` wrapper if you are sure the rest of | ||
the definition is correct. |
Oops, something went wrong.