diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b8e7b0..289d43e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,9 +3,7 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ master ] pull_request: - branches: [ master ] # Allows to run this workflow manually from the Actions tab workflow_dispatch: @@ -19,40 +17,40 @@ jobs: - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "./examples/Chapter 11 Example 1 Originations/Chapter 11 Example.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "./examples/Chapter 11 Example 1 Originations/Financial.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "examples/Chapter 11 Example 2 Ranked Loan Products/Recommended Loan Products.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "examples/Chapter 11 Example 2 Ranked Loan Products/Loan info.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "examples/Diagram Interchange/diagram-interchange-decision-service.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "examples/Diagram Interchange/diagram-interchange-decision-with-listed-input-data.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "examples/Diagram Interchange/diagram-interchange-dish-example.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() - uses: ChristophWurst/xmllint-action@v1.2 with: xml-file: "examples/Diagram Interchange/diagram-interchange-shape-with-label-text.dmn" - xml-schema-file: ./xsd/DMN15.xsd + xml-schema-file: ./xsd/DMN.xsd if: always() diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..bf05e38 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,62 @@ +{ + "xml.catalogs": [ + "xsd/catalog.xml" + ], + "xml.filePathSupport.mappings": [ + // see: https://github.com/redhat-developer/vscode-xml/blob/main/docs/Features/XMLFilePathSupport.md + { + "pattern": "**/*.dmn", + "expressions": [ + { + "xpath": "import/@locationURI" + } + ] + } + ], + "xml.references": [ + // see: https://github.com/redhat-developer/vscode-xml/blob/main/docs/Features/XMLReferencesFeatures.md + { + "pattern": "**/*.dmn", + "expressions": [ + { + "from": "itemComponent/typeRef/text()", + "to": "itemDefinition/@name" + }, + { + "from": "@dmnElementRef", + "to": "@id" + }, + { + "from": "@href", + "prefix": "#", + "to": "@id" + }, + { + "from": "DMNEdge/@sourceElement", + "to": "DMNShape/@id" + }, + { + "from": "DMNEdge/@targetElement", + "to": "DMNShape/@id" + } + ] + }, + { + "pattern": "**/*.xmi", + "expressions": [ + { + "from": "@idref", + "to": "@id" + }, + { + "from": "@type", + "to": "@id" + }, + { + "from": "@element", + "to": "@id" + } + ] + } + ] +} \ No newline at end of file diff --git a/examples/Chapter 11 Example 1 Originations/Chapter 11 Example.dmn b/examples/Chapter 11 Example 1 Originations/Chapter 11 Example.dmn index f548867..760b5c2 100644 --- a/examples/Chapter 11 Example 1 Originations/Chapter 11 Example.dmn +++ b/examples/Chapter 11 Example 1 Originations/Chapter 11 Example.dmn @@ -1,4 +1,15 @@ - + + @@ -7,7 +18,7 @@ - + string diff --git a/examples/Chapter 11 Example 1 Originations/Financial.dmn b/examples/Chapter 11 Example 1 Originations/Financial.dmn index 6d68313..2ec84e2 100644 --- a/examples/Chapter 11 Example 1 Originations/Financial.dmn +++ b/examples/Chapter 11 Example 1 Originations/Financial.dmn @@ -1,4 +1,14 @@ - + diff --git a/examples/Chapter 11 Example 2 Ranked Loan Products/Loan info.dmn b/examples/Chapter 11 Example 2 Ranked Loan Products/Loan info.dmn index 249d6d3..e24ed8f 100644 --- a/examples/Chapter 11 Example 2 Ranked Loan Products/Loan info.dmn +++ b/examples/Chapter 11 Example 2 Ranked Loan Products/Loan info.dmn @@ -1,5 +1,16 @@ - + string @@ -640,7 +651,7 @@ - + diff --git a/examples/Chapter 11 Example 2 Ranked Loan Products/Recommended Loan Products.dmn b/examples/Chapter 11 Example 2 Ranked Loan Products/Recommended Loan Products.dmn index 378068e..fa86414 100644 --- a/examples/Chapter 11 Example 2 Ranked Loan Products/Recommended Loan Products.dmn +++ b/examples/Chapter 11 Example 2 Ranked Loan Products/Recommended Loan Products.dmn @@ -1,6 +1,16 @@ - - + + string @@ -1171,7 +1181,7 @@ and To be paid off=true].Balance[item!=null]) - + diff --git a/examples/Diagram Interchange/diagram-interchange-decision-service.dmn b/examples/Diagram Interchange/diagram-interchange-decision-service.dmn index b37986a..efa10a3 100644 --- a/examples/Diagram Interchange/diagram-interchange-decision-service.dmn +++ b/examples/Diagram Interchange/diagram-interchange-decision-service.dmn @@ -3,11 +3,21 @@ id="Definitions_DecisionService" name="Decision Service" namespace="http://www.omg.org/spec/DMN/20180521/diagram-interchange-decision-service/" - xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" + xmlns="https://www.omg.org/spec/DMN/" + xmlns:dmndi="https://www.omg.org/spec/DMN/DI/" + xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" - xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + https://www.omg.org/spec/DMN/ + https://www.omg.org/spec/DMN/20240513/DMN.xsd + https://www.omg.org/spec/DMN/DI/ + https://www.omg.org/spec/DMN/20240513/DMNDI.xsd + http://www.omg.org/spec/DMN/20180521/DI/ + https://www.omg.org/spec/DMN/20180521/DI.xsd + http://www.omg.org/spec/DMN/20180521/DC/ + https://www.omg.org/spec/DMN/20180521/DC.xsd + "> diff --git a/examples/Diagram Interchange/diagram-interchange-decision-with-listed-input-data.dmn b/examples/Diagram Interchange/diagram-interchange-decision-with-listed-input-data.dmn index 24c2c59..59adf59 100644 --- a/examples/Diagram Interchange/diagram-interchange-decision-with-listed-input-data.dmn +++ b/examples/Diagram Interchange/diagram-interchange-decision-with-listed-input-data.dmn @@ -3,11 +3,21 @@ id="Definitions_0v8cooh" name="Decision with Listed Input data" namespace="http://www.omg.org/spec/DMN/20180521/diagram-interchange-decision-with-listed-input-data/" - xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" + xmlns="https://www.omg.org/spec/DMN/" + xmlns:dmndi="https://www.omg.org/spec/DMN/DI/" + xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" - xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + https://www.omg.org/spec/DMN/ + https://www.omg.org/spec/DMN/20240513/DMN.xsd + https://www.omg.org/spec/DMN/DI/ + https://www.omg.org/spec/DMN/20240513/DMNDI.xsd + http://www.omg.org/spec/DMN/20180521/DI/ + https://www.omg.org/spec/DMN/20180521/DI.xsd + http://www.omg.org/spec/DMN/20180521/DC/ + https://www.omg.org/spec/DMN/20180521/DC.xsd + "> diff --git a/examples/Diagram Interchange/diagram-interchange-dish-example.dmn b/examples/Diagram Interchange/diagram-interchange-dish-example.dmn index ac0365c..0ec09d0 100644 --- a/examples/Diagram Interchange/diagram-interchange-dish-example.dmn +++ b/examples/Diagram Interchange/diagram-interchange-dish-example.dmn @@ -1,11 +1,21 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + https://www.omg.org/spec/DMN/ + https://www.omg.org/spec/DMN/20240513/DMN.xsd + https://www.omg.org/spec/DMN/DI/ + https://www.omg.org/spec/DMN/20240513/DMNDI.xsd + http://www.omg.org/spec/DMN/20180521/DI/ + https://www.omg.org/spec/DMN/20180521/DI.xsd + http://www.omg.org/spec/DMN/20180521/DC/ + https://www.omg.org/spec/DMN/20180521/DC.xsd + "> diff --git a/examples/Diagram Interchange/diagram-interchange-shape-with-label-text.dmn b/examples/Diagram Interchange/diagram-interchange-shape-with-label-text.dmn index 20165ab..9d472c2 100644 --- a/examples/Diagram Interchange/diagram-interchange-shape-with-label-text.dmn +++ b/examples/Diagram Interchange/diagram-interchange-shape-with-label-text.dmn @@ -3,11 +3,21 @@ id="definitions_0v8cooh" name="Decision" namespace="http://www.omg.org/spec/DMN/20180521/diagram-interchange-shape-with-label-text/" - xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/" + xmlns="https://www.omg.org/spec/DMN/" + xmlns:dmndi="https://www.omg.org/spec/DMN/DI/" + xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" - xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + https://www.omg.org/spec/DMN/ + https://www.omg.org/spec/DMN/20240513/DMN.xsd + https://www.omg.org/spec/DMN/DI/ + https://www.omg.org/spec/DMN/20240513/DMNDI.xsd + http://www.omg.org/spec/DMN/20180521/DI/ + https://www.omg.org/spec/DMN/20180521/DI.xsd + http://www.omg.org/spec/DMN/20180521/DC/ + https://www.omg.org/spec/DMN/20180521/DC.xsd + "> diff --git a/xsd/DMN15.xsd b/xsd/DMN.xsd similarity index 95% rename from xsd/DMN15.xsd rename to xsd/DMN.xsd index a6b161e..b75dd2c 100644 --- a/xsd/DMN15.xsd +++ b/xsd/DMN.xsd @@ -1,12 +1,13 @@ - + - + Include the DMN Diagram Interchange (DI) schema @@ -54,8 +55,8 @@ - - + + diff --git a/xsd/DMNDI15.xsd b/xsd/DMNDI.xsd similarity index 87% rename from xsd/DMNDI15.xsd rename to xsd/DMNDI.xsd index 17b5535..f8b48ae 100644 --- a/xsd/DMNDI15.xsd +++ b/xsd/DMNDI.xsd @@ -1,15 +1,16 @@ - + + schemaLocation="DC.xsd"/> + schemaLocation="DI.xsd"/> diff --git a/xsd/catalog.xml b/xsd/catalog.xml new file mode 100644 index 0000000..35f0986 --- /dev/null +++ b/xsd/catalog.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xsd/dmn-namespace-utils.sh b/xsd/dmn-namespace-utils.sh index c25b78d..14603ac 100644 --- a/xsd/dmn-namespace-utils.sh +++ b/xsd/dmn-namespace-utils.sh @@ -5,10 +5,12 @@ DMN12='http://www.omg.org/spec/DMN/20180521/MODEL/' DMN13='https://www.omg.org/spec/DMN/20191111/MODEL/' DMN14='https://www.omg.org/spec/DMN/20211108/MODEL/' DMN15='https://www.omg.org/spec/DMN/20230324/MODEL/' +DMN16='https://www.omg.org/spec/DMN/' DMNDI11='http://www.omg.org/spec/DMN/20151101/DMNDI' DMNDI12='http://www.omg.org/spec/DMN/20180521/DMNDI/' DMNDI13='https://www.omg.org/spec/DMN/20191111/DMNDI/' DMNDI15='https://www.omg.org/spec/DMN/20230324/DMNDI/' +DMNDI16='https://www.omg.org/spec/DMN/DI/' DI='http://www.omg.org/spec/DMN/20180521/DI/' DC='http://www.omg.org/spec/DMN/20180521/DC/' FEEL10='http://www.omg.org/spec/FEEL/20140401' @@ -16,3 +18,4 @@ FEEL12='http://www.omg.org/spec/DMN/20180521/FEEL/' FEEL13='https://www.omg.org/spec/DMN/20191111/FEEL/' FEEL14='https://www.omg.org/spec/DMN/20211108/FEEL/' FEEL15='https://www.omg.org/spec/DMN/20230324/FEEL/' +FEEL16='https://www.omg.org/spec/DMN/20240513/FEEL/' \ No newline at end of file