From f21206eb95572af8759366fb249c868659c5674c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 11 Apr 2019 11:19:10 +0200 Subject: shiboken: Enable including typesystem XML snippets via entities Implement a QXmlStreamEntityResolver which resolves undeclared entities to file names in the type system include path. This is a work-around for the missing handling of standard externally parsed entities of QXmlStreamReader. Task-number: PYSIDE-955 Change-Id: I68ebae8ad465ae460c3a0eeadaef22dca2101e6c Reviewed-by: Christian Tismer --- .../shiboken2/doc/typesystem_specifying_types.rst | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'sources/shiboken2/doc/typesystem_specifying_types.rst') diff --git a/sources/shiboken2/doc/typesystem_specifying_types.rst b/sources/shiboken2/doc/typesystem_specifying_types.rst index f4016bc2c..ac1121461 100644 --- a/sources/shiboken2/doc/typesystem_specifying_types.rst +++ b/sources/shiboken2/doc/typesystem_specifying_types.rst @@ -3,6 +3,30 @@ Specifying Types .. _typesystem: +Including Snippets +^^^^^^^^^^^^^^^^^^ + +There might be repetitive XML code, for example function modifications that +need to be done on classes that are not related by type inheritance. +It is possible to split out such snippets and include them via an entity reference. + +.. code-block:: xml + + + + &common_function_modifications; + + + &common_function_modifications; + + + +The entity name is interpreted as file name (with suffix **xml**) appended and resolved +in the type system paths passed as command line argument. + +Note that this is not a standard externally parsed entity due to the limitations +of the underlying parser. + typesystem ^^^^^^^^^^ -- cgit v1.2.3