diff --git a/README.md b/README.md index 26c627c..e052a1e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A joint effort on fundamental features (where differentiation isn't possible any improves quality and assures interoperability. The reference implementation addresses the following aspects: -- Check data format and constraints according to the [CascAra meta-model](https://cascaRA.gfse.org/results/Latest%20Metamodel/) +- Check data format and constraints according to the [CASCaRA meta-model](https://product-information-graph.org/doc/metamodel/latest/) to assure data quality. - Persistently store and retrieve PIG data using the standardized API (to be defined). - View and edit PIG data in a web-browser. diff --git a/package.json b/package.json index 587a078..3be2928 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "CASCaRA_PIG-App", + "name": "CASCaRA-App", "version": "0.1.0", "private": true, "scripts": { diff --git a/public/assets/jsonld/jsonld.zip b/public/assets/jsonld/jsonld.zip deleted file mode 100644 index 281ea6f..0000000 Binary files a/public/assets/jsonld/jsonld.zip and /dev/null differ diff --git a/public/assets/xslt/ReqIF-to-PIG.sef.json b/public/assets/xslt/ReqIF-to-PIG.sef.json index e763ea1..0045c41 100644 --- a/public/assets/xslt/ReqIF-to-PIG.sef.json +++ b/public/assets/xslt/ReqIF-to-PIG.sef.json @@ -1 +1 @@ -{"N":"package","version":"10","packageVersion":"1","saxonVersion":"SaxonJS 2.7","target":"JS","targetVersion":"2","name":"TOP-LEVEL","relocatable":"false","buildDateTime":"2026-02-23T09:39:19.596-07:00","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd","C":[{"N":"co","binds":"","id":"0","uniform":"true","C":[{"N":"template","flags":"os","module":"ReqIF-to-PIG.xsl","slots":"200","baseUri":"file://C:/Users/chrissaenz/Dev/CASCaDE-HOME/CASCaDE-Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","name":"Q{}getAttributeValue","line":"137","expand-text":"false","sType":"* ","C":[{"N":"sequence","role":"body","sType":"* ","C":[{"N":"param","name":"Q{}values","slot":"0","sType":"* ","as":"* ","flags":"","line":"138","C":[{"N":"str","sType":"1AS ","val":"","role":"select"},{"N":"supplied","role":"conversion","slot":"0","sType":"* "}]},{"N":"param","name":"Q{}attrDefId","slot":"1","sType":"* ","as":"* ","flags":"","line":"139","C":[{"N":"str","sType":"1AS ","val":"","role":"select"},{"N":"supplied","role":"conversion","slot":"1","sType":"* "}]},{"N":"let","var":"Q{}stringValue","slot":"2","sType":"* ","line":"144","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"144","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}values","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"and","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-VALUE-STRING"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"slash","op":"/","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"DEFINITION"}]}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-STRING-REF"}]}]}]},{"N":"varRef","name":"Q{}attrDefId","slot":"1"}]}]}]}]}]}]},{"N":"let","var":"Q{}xhtmlValue","slot":"3","sType":"* ","line":"149","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"149","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}values","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"and","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-VALUE-XHTML"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"slash","op":"/","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"DEFINITION"}]}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-XHTML-REF"}]}]}]},{"N":"varRef","name":"Q{}attrDefId","slot":"1"}]}]}]}]}]}]},{"N":"choose","sType":"* ","type":"item()*","line":"150","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"152","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"153","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","role":"select","line":"153","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"156","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"157","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"157","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"docOrder","sType":"*NE","line":"160","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ex=http://ns.saxonica.com/xslt/export","line":"161","sType":"*N","C":[{"N":"docOrder","sType":"*N","role":"select","line":"161","C":[{"N":"docOrder","sType":"*N","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]},{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]"}]}]}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"164","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"165","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","role":"select","line":"165","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]}]}]}]}]},{"N":"co","id":"1","binds":"0 1","C":[{"N":"mode","onNo":"TC","flags":"","patternSlots":"0","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"1","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd","minImp":"0","flags":"s","slots":"200","baseUri":"file://C:/Users/chrissaenz/Dev/CASCaDE-HOME/CASCaDE-Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","line":"62","module":"ReqIF-to-PIG.xsl","expand-text":"false","match":"*[local-name()='SPEC-OBJECT']","prio":"0.5","matches":"NE","C":[{"N":"p.withPredicate","role":"match","sType":"1NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"p.nodeTest","test":"NE"},{"N":"compareToString","op":"eq","val":"SPEC-OBJECT","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]}]}]},{"N":"let","var":"Q{}objectId","slot":"0","sType":"*NE ","line":"63","role":"action","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"63"},{"N":"let","var":"Q{}values","slot":"1","sType":"*NE ","line":"64","C":[{"N":"filter","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"64","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"VALUES"}]}]},{"N":"let","var":"Q{}nameAttrDef","slot":"3","sType":"*NE ","line":"73","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","role":"select","line":"73","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-STRING"}]}]},{"N":"or","C":[{"N":"or","C":[{"N":"or","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"ReqIF.Name"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"ReqIF.ChapterName"}]}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Name"}]}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Title"}]}]}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]},{"N":"let","var":"Q{}textAttrDef","slot":"4","sType":"*NE ","line":"79","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","role":"select","line":"79","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-XHTML"}]}]},{"N":"or","C":[{"N":"or","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"ReqIF.Text"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Description"}]}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Text"}]}]}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]},{"N":"elem","name":"pig:anEntity","sType":"1NE nQ{http://product-information-graph.org}anEntity ","nsuri":"http://product-information-graph.org","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"80","C":[{"N":"sequence","sType":"* ","C":[{"N":"att","name":"rdf:type","nsuri":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"IREB:Requirement"}]},{"N":"att","name":"id","sType":"1NA ","line":"81","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"valueOf","sType":"1NT ","flags":"l","line":"82","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}objectId","slot":"0","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"82"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"let","var":"Q{}titleValue","slot":"5","sType":"* ","line":"85","C":[{"N":"doc","sType":"1ND ","base":"file://C:/Users/chrissaenz/Dev/CASCaDE-HOME/CASCaDE-Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","role":"select","C":[{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}getAttributeValue","line":"86","C":[{"N":"withParam","name":"Q{}values","slot":"1","sType":"*","C":[{"N":"varRef","name":"Q{}values","slot":"1","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"87"}]},{"N":"withParam","name":"Q{}attrDefId","slot":"0","sType":"*","C":[{"N":"varRef","name":"Q{}nameAttrDef","slot":"3","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"88"}]}]}]},{"N":"let","var":"Q{}descriptionValue","slot":"6","sType":"* ","line":"93","C":[{"N":"doc","sType":"1ND ","base":"file://C:/Users/chrissaenz/Dev/CASCaDE-HOME/CASCaDE-Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","role":"select","C":[{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}getAttributeValue","line":"94","C":[{"N":"withParam","name":"Q{}values","slot":"1","sType":"*","C":[{"N":"varRef","name":"Q{}values","slot":"1","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"95"}]},{"N":"withParam","name":"Q{}attrDefId","slot":"0","sType":"*","C":[{"N":"varRef","name":"Q{}textAttrDef","slot":"4","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"96"}]}]}]},{"N":"let","var":"Q{}hasTitle","slot":"7","sType":"* ","line":"101","C":[{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"101","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"normalize-space","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"varRef","name":"Q{}titleValue","slot":"5"}]}]}]}]},{"N":"int","val":"0"}]},{"N":"let","var":"Q{}hasDescription","slot":"8","sType":"* ","line":"102","C":[{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"102","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"normalize-space","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"varRef","name":"Q{}descriptionValue","slot":"6"}]}]}]}]},{"N":"int","val":"0"}]},{"N":"sequence","sType":"? ","C":[{"N":"choose","sType":"? ","type":"item()*","line":"105","C":[{"N":"varRef","name":"Q{}hasTitle","slot":"7","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"106"},{"N":"elem","name":"dcterms:title","sType":"1NE nQ{http://purl.org/dc/terms/}title ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"108","C":[{"N":"valueOf","flags":"l","sType":"1NT ","line":"109","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}titleValue","slot":"5","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"109"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"fn","name":"not","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"112","C":[{"N":"varRef","name":"Q{}hasDescription","slot":"8"}]},{"N":"elem","name":"dcterms:title","sType":"1NE nQ{http://purl.org/dc/terms/}title ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"114","C":[{"N":"sequence","sType":"*NT ","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Object with id "}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"116","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}objectId","slot":"0","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"116"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]},{"N":"choose","sType":"? ","line":"123","C":[{"N":"varRef","name":"Q{}hasDescription","slot":"8","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"123"},{"N":"elem","name":"dcterms:description","sType":"1NE nQ{http://purl.org/dc/terms/}description ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"124","C":[{"N":"valueOf","flags":"l","sType":"1NT ","line":"125","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}descriptionValue","slot":"6","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"125"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]},{"N":"elem","name":"dcterms:modified","sType":"1NE nQ{http://purl.org/dc/terms/}modified ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"129","C":[{"N":"choose","sType":"? ","line":"130","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"130","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LAST-CHANGE"},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LAST-CHANGE"}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"131","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"axis","sType":"*NA nQ{}LAST-CHANGE","name":"attribute","nodeTest":"*NA nQ{}LAST-CHANGE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"131"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]}]}]}]}]}]}]}]}]}]}]}]}]},{"N":"templateRule","rank":"1","prec":"0","seq":"0","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd","minImp":"0","flags":"s","slots":"200","baseUri":"file://C:/Users/chrissaenz/Dev/CASCaDE-HOME/CASCaDE-Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","line":"5","module":"ReqIF-to-PIG.xsl","expand-text":"false","match":"/","prio":"-0.5","matches":"ND","C":[{"N":"p.nodeTest","role":"match","test":"ND","sType":"1ND","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd "},{"N":"let","var":"Q{}header","slot":"0","sType":"*NE ","line":"6","role":"action","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"6","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-HEADER"}]}]}]}]}]},{"N":"elem","name":"pig:aPackage","sType":"1NE nQ{http://product-information-graph.org}aPackage ","nsuri":"http://product-information-graph.org","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"7","C":[{"N":"sequence","sType":"*N ","C":[{"N":"att","name":"rdf:type","nsuri":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"pig:Package"}]},{"N":"att","name":"id","sType":"1NA ","line":"9","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"choose","sType":"?NT ","type":"item()*","line":"10","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","line":"11","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"12","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","role":"select","line":"12","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"reqif-package"}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"elem","name":"dcterms:title","sType":"1NE nQ{http://purl.org/dc/terms/}title ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"20","C":[{"N":"choose","sType":"*NT ","type":"item()*","line":"21","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"22","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"TITLE"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"TITLE"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"23","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"23","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"TITLE"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"25","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REPOSITORY-ID"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REPOSITORY-ID"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"sequence","sType":"*NT ","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Requirements from "}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"27","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"27","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REPOSITORY-ID"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"true"},{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Requirements from unknown project"}]}]}]},{"N":"elem","name":"dcterms:description","sType":"1NE nQ{http://purl.org/dc/terms/}description ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"35","C":[{"N":"choose","sType":"*NT ","type":"item()*","line":"36","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"37","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"COMMENT"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"COMMENT"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"38","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"38","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"COMMENT"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"40","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-TOOL-ID"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-TOOL-ID"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"sequence","sType":"*NT ","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Created with "}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"42","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"42","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-TOOL-ID"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"true"},{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"ReqIF Document"}]}]}]},{"N":"elem","name":"dcterms:modified","sType":"1NE nQ{http://purl.org/dc/terms/}modified ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"50","C":[{"N":"choose","sType":"? ","line":"51","C":[{"N":"docOrder","sType":"*NE","line":"51","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"CREATION-TIME"}]}]}]}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"52","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"52","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"CREATION-TIME"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]},{"N":"elem","name":"graph","sType":"1NE nQ{}graph ","nsuri":"","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"56","C":[{"N":"applyT","sType":"* ","line":"57","mode":"#unnamed","bSlot":"1","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"57","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"SPEC-OBJECT"}]}]}]}]}]}]}]}]}]}]}]}]}]},{"N":"overridden"},{"N":"output","C":[{"N":"property","name":"Q{http://saxon.sf.net/}stylesheet-version","value":"10"},{"N":"property","name":"method","value":"xml"},{"N":"property","name":"encoding","value":"UTF-8"},{"N":"property","name":"indent","value":"yes"},{"N":"property","name":"standalone","value":"yes"}]},{"N":"decimalFormat"}],"Σ":"486b2a1f"} \ No newline at end of file +{"N":"package","version":"10","packageVersion":"1","saxonVersion":"SaxonJS 2.7","target":"JS","targetVersion":"2","name":"TOP-LEVEL","relocatable":"false","buildDateTime":"2026-02-27T15:13:54.026+01:00","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd","C":[{"N":"co","binds":"","id":"0","uniform":"true","C":[{"N":"template","flags":"os","module":"ReqIF-to-PIG.xsl","slots":"200","baseUri":"file://C:/Users/OD/Documents/GitHub/CASCaDE/Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","name":"Q{}getAttributeValue","line":"137","expand-text":"false","sType":"* ","C":[{"N":"sequence","role":"body","sType":"* ","C":[{"N":"param","name":"Q{}values","slot":"0","sType":"* ","as":"* ","flags":"","line":"138","C":[{"N":"str","sType":"1AS ","val":"","role":"select"},{"N":"supplied","role":"conversion","slot":"0","sType":"* "}]},{"N":"param","name":"Q{}attrDefId","slot":"1","sType":"* ","as":"* ","flags":"","line":"139","C":[{"N":"str","sType":"1AS ","val":"","role":"select"},{"N":"supplied","role":"conversion","slot":"1","sType":"* "}]},{"N":"let","var":"Q{}stringValue","slot":"2","sType":"* ","line":"144","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"144","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}values","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"and","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-VALUE-STRING"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"slash","op":"/","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"DEFINITION"}]}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-STRING-REF"}]}]}]},{"N":"varRef","name":"Q{}attrDefId","slot":"1"}]}]}]}]}]}]},{"N":"let","var":"Q{}xhtmlValue","slot":"3","sType":"* ","line":"149","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"149","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}values","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"and","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-VALUE-XHTML"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"slash","op":"/","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"DEFINITION"}]}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-XHTML-REF"}]}]}]},{"N":"varRef","name":"Q{}attrDefId","slot":"1"}]}]}]}]}]}]},{"N":"choose","sType":"* ","type":"item()*","line":"150","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"152","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"153","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","role":"select","line":"153","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"156","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"157","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"157","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}stringValue","slot":"2"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"docOrder","sType":"*NE","line":"160","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]}]}]},{"N":"copyOf","flags":"c","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ex=http://ns.saxonica.com/xslt/export","line":"161","sType":"*N","C":[{"N":"docOrder","sType":"*N","role":"select","line":"161","C":[{"N":"docOrder","sType":"*N","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"THE-VALUE"}]}]}]},{"N":"axis","name":"child","nodeTest":"*N u[NT,NP,NC,NE]"}]}]}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"164","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"165","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","role":"select","line":"165","C":[{"N":"docOrder","sType":"*NA nQ{}THE-VALUE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}xhtmlValue","slot":"3"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}THE-VALUE"}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]}]}]}]}]},{"N":"co","id":"1","binds":"0 1","C":[{"N":"mode","onNo":"TC","flags":"","patternSlots":"0","prec":"","C":[{"N":"templateRule","rank":"0","prec":"0","seq":"1","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd","minImp":"0","flags":"s","slots":"200","baseUri":"file://C:/Users/OD/Documents/GitHub/CASCaDE/Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","line":"62","module":"ReqIF-to-PIG.xsl","expand-text":"false","match":"*[local-name()='SPEC-OBJECT']","prio":"0.5","matches":"NE","C":[{"N":"p.withPredicate","role":"match","sType":"1NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"p.nodeTest","test":"NE"},{"N":"compareToString","op":"eq","val":"SPEC-OBJECT","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]}]}]},{"N":"let","var":"Q{}objectId","slot":"0","sType":"*NE ","line":"63","role":"action","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"63"},{"N":"let","var":"Q{}values","slot":"1","sType":"*NE ","line":"64","C":[{"N":"filter","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"64","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"VALUES"}]}]},{"N":"let","var":"Q{}nameAttrDef","slot":"3","sType":"*NE ","line":"73","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","role":"select","line":"73","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-STRING"}]}]},{"N":"or","C":[{"N":"or","C":[{"N":"or","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"ReqIF.Name"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"ReqIF.ChapterName"}]}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Name"}]}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Title"}]}]}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]},{"N":"let","var":"Q{}textAttrDef","slot":"4","sType":"*NE ","line":"79","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","role":"select","line":"79","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"ATTRIBUTE-DEFINITION-XHTML"}]}]},{"N":"or","C":[{"N":"or","C":[{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"ReqIF.Text"}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Description"}]}]},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LONG-NAME"},{"N":"str","val":"Text"}]}]}]}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]},{"N":"elem","name":"pig:anEntity","sType":"1NE nQ{http://product-information-graph.org}anEntity ","nsuri":"http://product-information-graph.org","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"80","C":[{"N":"sequence","sType":"* ","C":[{"N":"att","name":"rdf:type","nsuri":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"IREB:Requirement"}]},{"N":"att","name":"id","sType":"1NA ","line":"81","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"valueOf","sType":"1NT ","flags":"l","line":"82","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}objectId","slot":"0","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"82"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"let","var":"Q{}titleValue","slot":"5","sType":"* ","line":"85","C":[{"N":"doc","sType":"1ND ","base":"file://C:/Users/OD/Documents/GitHub/CASCaDE/Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","role":"select","C":[{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}getAttributeValue","line":"86","C":[{"N":"withParam","name":"Q{}values","slot":"1","sType":"*","C":[{"N":"varRef","name":"Q{}values","slot":"1","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"87"}]},{"N":"withParam","name":"Q{}attrDefId","slot":"0","sType":"*","C":[{"N":"varRef","name":"Q{}nameAttrDef","slot":"3","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"88"}]}]}]},{"N":"let","var":"Q{}descriptionValue","slot":"6","sType":"* ","line":"93","C":[{"N":"doc","sType":"1ND ","base":"file://C:/Users/OD/Documents/GitHub/CASCaDE/Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","role":"select","C":[{"N":"callT","bSlot":"0","sType":"* ","name":"Q{}getAttributeValue","line":"94","C":[{"N":"withParam","name":"Q{}values","slot":"1","sType":"*","C":[{"N":"varRef","name":"Q{}values","slot":"1","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"95"}]},{"N":"withParam","name":"Q{}attrDefId","slot":"0","sType":"*","C":[{"N":"varRef","name":"Q{}textAttrDef","slot":"4","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"96"}]}]}]},{"N":"let","var":"Q{}hasTitle","slot":"7","sType":"* ","line":"101","C":[{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"101","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"normalize-space","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"varRef","name":"Q{}titleValue","slot":"5"}]}]}]}]},{"N":"int","val":"0"}]},{"N":"let","var":"Q{}hasDescription","slot":"8","sType":"* ","line":"102","C":[{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"102","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"normalize-space","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"varRef","name":"Q{}descriptionValue","slot":"6"}]}]}]}]},{"N":"int","val":"0"}]},{"N":"sequence","sType":"? ","C":[{"N":"choose","sType":"? ","type":"item()*","line":"105","C":[{"N":"varRef","name":"Q{}hasTitle","slot":"7","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"106"},{"N":"elem","name":"dcterms:title","sType":"1NE nQ{http://purl.org/dc/terms/}title ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"108","C":[{"N":"valueOf","flags":"l","sType":"1NT ","line":"109","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}titleValue","slot":"5","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"109"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"fn","name":"not","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"112","C":[{"N":"varRef","name":"Q{}hasDescription","slot":"8"}]},{"N":"elem","name":"dcterms:title","sType":"1NE nQ{http://purl.org/dc/terms/}title ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"114","C":[{"N":"sequence","sType":"*NT ","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Object with id "}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"116","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}objectId","slot":"0","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"116"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]},{"N":"choose","sType":"? ","line":"123","C":[{"N":"varRef","name":"Q{}hasDescription","slot":"8","sType":"*","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"123"},{"N":"elem","name":"dcterms:description","sType":"1NE nQ{http://purl.org/dc/terms/}description ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"124","C":[{"N":"valueOf","flags":"l","sType":"1NT ","line":"125","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"varRef","sType":"*","name":"Q{}descriptionValue","slot":"6","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"125"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]},{"N":"elem","name":"dcterms:modified","sType":"1NE nQ{http://purl.org/dc/terms/}modified ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"129","C":[{"N":"choose","sType":"? ","line":"130","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"130","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LAST-CHANGE"},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}LAST-CHANGE"}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"131","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"axis","sType":"*NA nQ{}LAST-CHANGE","name":"attribute","nodeTest":"*NA nQ{}LAST-CHANGE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","role":"select","line":"131"}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]}]}]}]}]}]}]}]}]}]}]}]}]},{"N":"templateRule","rank":"1","prec":"0","seq":"0","ns":"xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd","minImp":"0","flags":"s","slots":"200","baseUri":"file://C:/Users/OD/Documents/GitHub/CASCaDE/Reference-Implementation/public/assets/xslt/ReqIF-to-PIG.xsl","line":"5","module":"ReqIF-to-PIG.xsl","expand-text":"false","match":"/","prio":"-0.5","matches":"ND","C":[{"N":"p.nodeTest","role":"match","test":"ND","sType":"1ND","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd "},{"N":"let","var":"Q{}header","slot":"0","sType":"*NE ","line":"6","role":"action","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"6","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-HEADER"}]}]}]}]}]},{"N":"elem","name":"pig:aPackage","sType":"1NE nQ{http://product-information-graph.org}aPackage ","nsuri":"http://product-information-graph.org","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"7","C":[{"N":"sequence","sType":"*N ","C":[{"N":"att","name":"rdf:type","nsuri":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","sType":"1NA ","C":[{"N":"str","sType":"1AS ","val":"pig:Package"}]},{"N":"att","name":"id","sType":"1NA ","line":"9","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"choose","sType":"?NT ","type":"item()*","line":"10","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","line":"11","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"12","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","role":"select","line":"12","C":[{"N":"docOrder","sType":"*NA nQ{}IDENTIFIER","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"axis","name":"attribute","nodeTest":"*NA nQ{}IDENTIFIER"}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"reqif-package"}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":""}]}]},{"N":"elem","name":"dcterms:title","sType":"1NE nQ{http://purl.org/dc/terms/}title ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"20","C":[{"N":"choose","sType":"*NT ","type":"item()*","line":"21","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"22","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"TITLE"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"TITLE"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"23","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"23","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"TITLE"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"25","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REPOSITORY-ID"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REPOSITORY-ID"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"sequence","sType":"*NT ","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Requirements from "}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"27","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"27","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REPOSITORY-ID"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"true"},{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Requirements from unknown project"}]}]}]},{"N":"elem","name":"dcterms:description","sType":"1NE nQ{http://purl.org/dc/terms/}description ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"35","C":[{"N":"choose","sType":"*NT ","type":"item()*","line":"36","C":[{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"37","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"COMMENT"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"COMMENT"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"38","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"38","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"COMMENT"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"and","sType":"1AB","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","line":"40","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-TOOL-ID"}]}]}]}]},{"N":"gc10","op":">","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"string-length","C":[{"N":"fn","name":"string","C":[{"N":"first","C":[{"N":"docOrder","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-TOOL-ID"}]}]}]}]}]}]}]},{"N":"int","val":"0"}]}]},{"N":"sequence","sType":"*NT ","C":[{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"Created with "}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"42","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"42","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"REQ-IF-TOOL-ID"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]}]},{"N":"true"},{"N":"valueOf","sType":"1NT ","C":[{"N":"str","sType":"1AS ","val":"ReqIF Document"}]}]}]},{"N":"elem","name":"dcterms:modified","sType":"1NE nQ{http://purl.org/dc/terms/}modified ","nsuri":"http://purl.org/dc/terms/","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"50","C":[{"N":"choose","sType":"? ","line":"51","C":[{"N":"docOrder","sType":"*NE","line":"51","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"CREATION-TIME"}]}]}]}]}]},{"N":"valueOf","flags":"l","sType":"1NT ","line":"52","C":[{"N":"fn","name":"string-join","role":"select","C":[{"N":"first","C":[{"N":"forEach","sType":"*AS ","C":[{"N":"data","sType":"*A ","C":[{"N":"mergeAdj","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"52","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"treat","as":"N","diag":"1|0|XPTY0019|slash","C":[{"N":"varRef","name":"Q{}header","slot":"0"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"CREATION-TIME"}]}]}]}]}]}]}]},{"N":"fn","name":"string","sType":"1AS ","C":[{"N":"dot"}]}]}]},{"N":"str","sType":"1AS ","val":" "}]}]},{"N":"true"},{"N":"empty","sType":"0 "}]}]},{"N":"elem","name":"graph","sType":"1NE nQ{}graph ","nsuri":"","namespaces":"dcterms=http://purl.org/dc/terms/ pig=http://product-information-graph.org rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd csc=http://omg.org/CASCaRA/cas/","line":"56","C":[{"N":"applyT","sType":"* ","line":"57","mode":"#unnamed","bSlot":"1","C":[{"N":"docOrder","sType":"*NE","role":"select","line":"57","C":[{"N":"docOrder","sType":"*NE","ns":"= xml=~ xsl=~ pig=http://product-information-graph.org dcterms=http://purl.org/dc/terms/ rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# csc=http://omg.org/CASCaRA/cas/ reqif=http://www.omg.org/spec/ReqIF/20110401/reqif.xsd ","C":[{"N":"slash","op":"/","C":[{"N":"slash","op":"/","C":[{"N":"root"},{"N":"axis","name":"descendant-or-self","nodeTest":"*N"}]},{"N":"filter","C":[{"N":"axis","name":"child","nodeTest":"*NE"},{"N":"gc10","op":"=","comp":"GAC|http://www.w3.org/2005/xpath-functions/collation/codepoint","card":"1:1","C":[{"N":"fn","name":"local-name","C":[{"N":"dot"}]},{"N":"str","val":"SPEC-OBJECT"}]}]}]}]}]}]}]}]}]}]}]}]}]},{"N":"overridden"},{"N":"output","C":[{"N":"property","name":"Q{http://saxon.sf.net/}stylesheet-version","value":"10"},{"N":"property","name":"method","value":"xml"},{"N":"property","name":"encoding","value":"UTF-8"},{"N":"property","name":"indent","value":"yes"},{"N":"property","name":"standalone","value":"yes"}]},{"N":"decimalFormat"}],"Σ":"4b86ed2f"} \ No newline at end of file diff --git a/public/index.html b/public/index.html index 2ebcd3a..8f398d9 100644 --- a/public/index.html +++ b/public/index.html @@ -3,9 +3,10 @@ - + + <%= htmlWebpackPlugin.options.title %> diff --git a/src/App.vue b/src/App.vue index 22b33e2..4427f77 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,27 +1,35 @@ \ No newline at end of file + #app { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: center; + color: #2c3e50; + margin-top: 60px; + } + diff --git a/src/build-info.ts b/src/build-info.ts index c03a833..6705845 100644 --- a/src/build-info.ts +++ b/src/build-info.ts @@ -1,13 +1,13 @@ // Auto-generated by scripts/generate-build-info.js - DO NOT EDIT -// Generated at: 2026-02-23T16:39:18.651Z +// Generated at: 2026-02-27T14:13:52.124Z export const BUILD_INFO = { // from package.json: - appName: 'CASCaRA_PIG-App', + appName: 'CASCaRA-App', appVersion: '0.1.0', // from Git: - buildTime: '2026-02-23T16:39:18.651Z', - gitCommit: '6f3c2e4', - gitBranch: '52-installable-with-relative-links', + buildTime: '2026-02-27T14:13:52.124Z', + gitCommit: '46b49fd', + gitBranch: '#25-Improve-HTML-rendering', gitDirty: false }; diff --git a/src/common-code/README.md b/src/common-code/README.md new file mode 100644 index 0000000..874df60 --- /dev/null +++ b/src/common-code/README.md @@ -0,0 +1,3 @@ +# Common Code + +This folder contains code common to all deployment packages, namely for the browser and the server. \ No newline at end of file diff --git a/src/common-code/import/jsonld/import-jsonld.ts b/src/common-code/import/jsonld/import-jsonld.ts new file mode 100644 index 0000000..94c9019 --- /dev/null +++ b/src/common-code/import/jsonld/import-jsonld.ts @@ -0,0 +1,174 @@ +/*! + * Cross-environment JSON-LD importer. + * Copyright 2025 GfSE (https://gfse.org) + * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + */ +/** + * JSON-LD Importer - Static class for importing PIG JSON-LD documents + * + * Cross-environment JSON-LD importer: + * - Accepts a Node file path, an http(s) URL string or a browser File/Blob. + * - Extracts elements from '@graph' (or 'graph'), converts JSON-LD keys to internal keys + * and instantiates matching PIG class instances where possible. + * + * Authors: oskar.dungern@gfse.org + * + * Design Decisions: + * - Static class design for consistency with ReqIFImporter and XmlImporter + * - Direct JSON-LD processing without transformation + * - Validation through APackage.setJSONLD() method + * + * Usage: + * - Node: await JsonldImporter.import('C:/path/to/file.jsonld') + * - URL: await JsonldImporter.import('https://example/.../doc.jsonld') + * - Browser: await JsonldImporter.import(fileInput.files[0]) + */ + +import { IRsp, rspOK, Rsp, Msg } from '../../lib/messages'; +import { LOG } from '../../lib/helpers'; +import { PIN } from '../../lib/platform-independence'; +import { APackage, TPigItem } from '../../schema/pig/ts/pig-metaclasses'; +import { SCH_LD } from '../../schema/pig/jsonld/pig-schemata-jsonld'; + +/** + * JSON-LD document structure + */ +interface JsonLdDocument { + '@context'?: unknown; + '@graph'?: unknown[]; + '@id'?: string; + '@type'?: string | string[]; + [key: string]: unknown; +} + +/** + * JSON-LD Importer + * Static class for importing and parsing PIG JSON-LD documents + */ +export class JsonldImporter { + /** + * Import JSON-LD document and instantiate PIG items + * + * @param source - File path (Node.js), URL, or File/Blob object (Browser) + * @returns IRsp containing array of TPigItem (first item is APackage, rest are graph items) + * + * @example + * // Node.js + * const result = await JsonldImporter.import('./package.jsonld'); + * + * @example + * // Browser + * const file = fileInput.files[0]; + * const result = await JsonldImporter.import(file); + * + * @example + * // URL + * const result = await JsonldImporter.import('https://example.org/data.jsonld'); + */ + static async import(source: string | File | Blob): Promise { + // Read file content + const rsp = await PIN.readFileAsText(source); + if (!rsp.ok) { + return rsp; + } + + const text = rsp.response as string; + + // Parse JSON document + let doc: JsonLdDocument; + try { + doc = JSON.parse(text) as JsonLdDocument; + } catch (err: unknown) { + const errorMessage = err instanceof Error ? err.message : String(err); + return Msg.create(690, 'JSON-LD', errorMessage); + } + + // Validate JSON-LD document structure + const validationResult = await this.validateJsonLdDocument(doc); + if (!validationResult.ok) { + return validationResult; + } + + // Instantiate APackage and load the document + const aPackage = new APackage().setJSONLD(doc); + + // Check if package was successfully created + if (!aPackage.status().ok) { + return aPackage.status(); + } + + // Get all items (package + graph items) + const allItems = aPackage.getItems(); + + // Calculate import statistics + const expectedCount = doc['@graph']?.length || 0; + const actualCount = allItems.length - 1; // -1 for package itself + + // Build result response + let result: IRsp; + if (actualCount === expectedCount) { + LOG.info( + `JsonldImporter: successfully imported package with all ${actualCount} items` + ); + result = Rsp.create(0, allItems, 'json', 'JSON-LD', actualCount, expectedCount); + } else { + // Log details about erroneous items + const errorDetails = this.buildErrorReport(allItems); + LOG.warn( + `JsonldImporter: imported ${actualCount} of ${expectedCount} items${errorDetails}` + ); + + result = Rsp.create(691, allItems, 'json', 'JSON-LD', actualCount, expectedCount); + } + + return result as IRsp; + } + + /** + * Validate JSON-LD document structure + * + * Checks for: + * - Valid @context + * - Valid @graph structure + * - Schema compliance + * + * @param doc - Parsed JSON-LD document + * @returns IRsp indicating success or error + * @private + */ + private static async validateJsonLdDocument(doc: JsonLdDocument): Promise { + // Validate entire JSON-LD document structure using schema + const isValidPackage = await SCH_LD.validatePackageLD(doc); + + if (!isValidPackage) { + const errors = await SCH_LD.getValidatePackageLDErrors(); + LOG.error('JSON-LD package validation failed:', errors); + return Msg.create(697, 'JSON-LD', errors); + } + + return rspOK; + } + + /** + * Build detailed error report for failed items + * + * @param allItems - All items including package + * @returns Formatted error report string + * @private + */ + private static buildErrorReport(allItems: TPigItem[]): string { + let errorReport = '\nErroneous items:'; + + for (let i = 1; i < allItems.length; i++) { + const status = allItems[i].status(); + if (!status.ok) { + errorReport += `\n- graph[${i}]: (${status.status}) ${status.statusText}`; + } + } + + return errorReport; + } +} + +// Export convenience function for backward compatibility +// export const importJSONLD = JsonldImporter.import.bind(JsonldImporter); diff --git a/src/common-code/import/reqif/import-reqif.ts b/src/common-code/import/reqif/import-reqif.ts new file mode 100644 index 0000000..c9d511b --- /dev/null +++ b/src/common-code/import/reqif/import-reqif.ts @@ -0,0 +1,219 @@ +/*! + * Imports a ReqIF XML document and transforms it using the ReqIF-to-PIG stylesheet. + * Copyright 2025 GfSE (https://gfse.org) + * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + * We appreciate any correction, comment or contribution as Github issue (https://github.com/GfSE/CASCaDE-Reference-Implementation/issues) + */ +/** + * ReqIF Importer - Static class for importing ReqIF documents + * + * Imports a ReqIF XML document and transforms it using a ReqIF-to-PIG stylesheet. + * Authors: oskar.dungern@gfse.org + * + * Security note: Uses saxon-js which has a transitive dependency on @xmldom/xmldom + * with known vulnerabilities. Input is validated and size-limited. See docs/SECURITY.md + * - The build configuration via package.json loads a newer version of xmldom without critical vulnerability + * replacing the dependency of saxon-js. + * + * Design Decisions: + * - SEF stylesheet is loaded from public/assets/xslt/ in both environments + * - Browser: fetches via HTTP from /assets/xslt/ + * - Node.js: reads from local public/assets/xslt/ directory + * - Single source of truth: SEF file stored only in public/assets/xslt/ + * - Static class design for consistency with other importers + * - Source file is loaded inside (like importXML and importJSONLD), for consistency. + * + * ToDo: + * - Extend the constraint checks - very limited now. + */ + +import { LOG } from '../../lib/helpers'; +import { PIN } from '../../lib/platform-independence'; +import { IRsp, Msg, Rsp /*, rspOK*/ } from '../../lib/messages'; +import { APackage /*, TPigItem*/ } from '../../schema/pig/ts/pig-metaclasses'; +import { ConstraintCheckType } from '../../schema/pig/ts/pig-package-constraints'; + +/** + * ReqIF Importer + * Static class for importing and transforming ReqIF documents to PIG format + */ +export class ReqifImporter { + private static readonly MAX_XML_SIZE = 4 * 1024 * 1024; // 4MB + + /** + * Import ReqIF document and transform to PIG items + * + * @param source - File path (Node.js), URL, or File/Blob object (Browser) + * @returns IRsp containing array of TPigItem (first item is APackage, rest are graph items) + * + * @example + * // Node.js + * const result = await ReqIFImporter.import('./test.reqif'); + * + * @example + * // Browser + * const file = fileInput.files[0]; + * const result = await ReqIFImporter.import(file); + */ + static async import(source: string | File): Promise> { + // Extract filename for validation and logging + const filename = typeof source === 'string' ? source : source.name; + + // Normalize filename/URL for extension check: + // - Strip query/fragment (for URLs) + // - Make case-insensitive + const normalized = filename.split(/[?#]/, 1)[0].toLowerCase(); + + // Validate file extension + if (!normalized.endsWith('.reqif')) { + return Msg.create(660, filename, 'expected .reqif file extension'); + } + + // Read file content + const rspRead = await PIN.readFileAsText(source); + if (!rspRead.ok) { + return rspRead; + } + + const xmlToTransform = rspRead.response as string; + + // Security: Size limit check + if (xmlToTransform.length > this.MAX_XML_SIZE) { + return Msg.create( + 660, + filename, + `file too large (max ${this.MAX_XML_SIZE / 1024 / 1024}MB)` + ); + } + + // Security: Basic XML structure validation + const trimmed = xmlToTransform.trim(); + if (!trimmed.startsWith(' { + // Read file content + const rsp = await PIN.readFileAsText(source); + if (!rsp.ok) { + return rsp; + } + + const xmlString = rsp.response as string; + + // Validate XML syntax + const validationResult = this.validateXmlSyntax(xmlString); + if (!validationResult.ok) { + return validationResult; + } + + // Instantiate APackage directly from XML string + // APackage.setXML() handles: + // - XML to JSON conversion + // - Schema validation + // - Constraint checking + // - Graph item instantiation + const aPackage = new APackage().setXML(xmlString); + + // Get all items (package + graph items) + const allItems = aPackage.getItems(); + + // Calculate import statistics + const expectedCount = aPackage.graph?.length || 0; + const actualCount = allItems.length - 1; // -1 for package itself + + // Build result response + let result: IRsp; + if (actualCount === expectedCount) { + LOG.info( + `XmlImporter: successfully imported package with all ${actualCount} items` + ); + result = Rsp.create(0, allItems, 'json'); + } else { + // Log details about erroneous items + const errorDetails = this.buildErrorReport(allItems); + LOG.warn( + `XmlImporter: imported ${actualCount} of ${expectedCount} items${errorDetails}` + ); + + result = Rsp.create(691, allItems, 'json', 'XML', actualCount, expectedCount); + } + + return result as IRsp; + } + + /** + * Validate XML syntax before parsing + * + * @param xmlString - XML string to validate + * @returns IRsp indicating success or error + * @private + */ + private static validateXmlSyntax(xmlString: string): IRsp { + try { + const parser = PIN.createDOMParser(); + const doc = parser.parseFromString(xmlString, 'text/xml'); + const parserError = PIN.getXmlParseError(doc); + + if (parserError) { + const errorMessage = + parserError.textContent || 'Unknown XML parsing error'; + return Msg.create(690, 'XML', errorMessage); + } + + return rspOK; + } catch (err: any) { + return Msg.create(690, 'XML', err?.message ?? String(err)); + } + } + + /** + * Build detailed error report for failed items + * + * @param allItems - All items including package + * @returns Formatted error report string + * @private + */ + private static buildErrorReport(allItems: TPigItem[]): string { + let errorReport = '\nErroneous items:'; + + for (let i = 1; i < allItems.length; i++) { + const status = allItems[i].status(); + if (!status.ok) { + errorReport += `\n- graph[${i}]: (${status.status}) ${status.statusText}`; + } + } + + return errorReport; + } +} + +// Export convenience function for backward compatibility +// export const importXML = XmlImporter.import.bind(XmlImporter); diff --git a/src/utils/lib/definitions.ts b/src/common-code/lib/definitions.ts similarity index 98% rename from src/utils/lib/definitions.ts rename to src/common-code/lib/definitions.ts index ffa358e..b72457a 100644 --- a/src/utils/lib/definitions.ts +++ b/src/common-code/lib/definitions.ts @@ -10,7 +10,7 @@ export const DEF = { // Default for local terms (names) without an explicit namespace defaultDataNamespace: PIG_DOMAIN + 'default/data#', // for data instances with prefix d: defaultOntologyNamespace: PIG_DOMAIN + 'default/ontology#', // for (application or project) ontology terms with prefix o: - pigVersion: '2026-02-12', + pigVersion: '2026-02-23', ...BUILD_INFO }; diff --git a/src/utils/lib/helpers.ts b/src/common-code/lib/helpers.ts similarity index 100% rename from src/utils/lib/helpers.ts rename to src/common-code/lib/helpers.ts diff --git a/src/utils/lib/messages.ts b/src/common-code/lib/messages.ts similarity index 98% rename from src/utils/lib/messages.ts rename to src/common-code/lib/messages.ts index 0a202ff..95e658e 100644 --- a/src/utils/lib/messages.ts +++ b/src/common-code/lib/messages.ts @@ -5,19 +5,19 @@ * We appreciate any correction, comment or contribution as Github issue (https://github.com/GfSE/CASCaDE-Reference-Implementation/issues) */ /** Product Information Graph (PIG) - Centralized error and status messages -* Dependencies: none (self-contained) -* Authors: oskar.dungern@gfse.org -* License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) -* -* Design Decisions: -* - All PIG validation and error messages centralized here -* - Status codes 600-699 reserved for PIG-specific messages -* - Messages are parameterized for flexibility -* - Self-contained with IRsp definition to avoid circular dependencies -* - Msg: for responses without payload (status/statusText only) -* - Rsp: for responses with payload (response/responseType) -* - Multi-language support: en, de, fr, es -*/ + * Dependencies: none (self-contained) + * Authors: oskar.dungern@gfse.org + * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + * + * Design Decisions: + * - All PIG validation and error messages centralized here + * - Status codes 600-699 reserved for PIG-specific messages + * - Messages are parameterized for flexibility + * - Self-contained with IRsp definition to avoid circular dependencies + * - Msg: for responses without payload (status/statusText only) + * - Rsp: for responses with payload (response/responseType) + * - Multi-language support: en, de, fr, es + */ /** IRsp interface * An xhr-like object to return the result of the import; diff --git a/src/utils/lib/mvf.ts b/src/common-code/lib/mvf.ts similarity index 100% rename from src/utils/lib/mvf.ts rename to src/common-code/lib/mvf.ts diff --git a/src/utils/lib/platform-independence.ts b/src/common-code/lib/platform-independence.ts similarity index 100% rename from src/utils/lib/platform-independence.ts rename to src/common-code/lib/platform-independence.ts diff --git a/src/utils/schemas/pig/index.html b/src/common-code/schema/pig/index.html similarity index 98% rename from src/utils/schemas/pig/index.html rename to src/common-code/schema/pig/index.html index 1e6f84a..1b1ae5b 100644 --- a/src/utils/schemas/pig/index.html +++ b/src/common-code/schema/pig/index.html @@ -304,10 +304,10 @@

Key Features

+
+

Import Plugins

+
    +
  • + {{ name }} +
  • +
+ +
+ + +
+

Build Information

+
+
Version
+
{{ DEF.appVersion }}
+
Build Time
+
{{ DEF.buildTime }}
+ +
Branch
+
{{ DEF.gitBranch }}
+
+
+ + diff --git a/src/components/Interfaces.vue b/src/components/Interfaces.vue index 227c974..2e57259 100644 --- a/src/components/Interfaces.vue +++ b/src/components/Interfaces.vue @@ -1,28 +1,24 @@ \ No newline at end of file + diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 87b3fe8..9bbdf44 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -1,41 +1,48 @@ - - - + diff --git a/src/components/Viewing.vue b/src/components/Viewing.vue index 49f81c7..26a4bee 100644 --- a/src/components/Viewing.vue +++ b/src/components/Viewing.vue @@ -40,44 +40,45 @@ \ No newline at end of file + diff --git a/src/main.js b/src/main.js deleted file mode 100644 index 79a2bd7..0000000 --- a/src/main.js +++ /dev/null @@ -1,4 +0,0 @@ -import { createApp } from 'vue'; -import App from './App.vue'; -createApp(App).mount('#app'); -//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 9a18199..3965a0c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,7 @@ import { createApp } from 'vue' import { createPinia } from 'pinia' import App from './App.vue' import ajvPlugin from './plugins/ajv'; +import { LOG } from './common-code/lib/helpers'; import 'vuetify/styles' import { createVuetify } from 'vuetify' @@ -9,11 +10,42 @@ import * as components from 'vuetify/components' import * as directives from 'vuetify/directives' import '@mdi/font/css/materialdesignicons.css' import router from './router'; +import '@/styles/main.css'; const vuetify = createVuetify({ components, directives, - }) + theme: { + defaultTheme: 'cas', + themes: { + cas: { + colors: { + primary: '#c83b05', // 75% + secondary: '#e25505', // 50% + + // cas-100: '#ad0505', + // cas-75: '#c83b05', + // cas-50: '#e25505', + // cas-25: '#fc7705', + // cas-0: '#ff6d05', + + // vue standard colors: + // primary: '#1976d2', + // secondary: '#424242', + success: '#4caf50', + info: '#2196f3', + warning: '#fb8c00', + error: '#ff5252', + background: '#f5f5f5', + surface: '#ffffff' + }, + variables: { + 'font-family': "'Roboto', Arial, sans-serif" + } + } + } + } +}); const app = createApp(App); @@ -35,9 +67,9 @@ pluginFiles.keys().forEach((filePath: string) => { const exportComponents = Object.fromEntries(Object.entries(app._context.components).filter(([key, value]) => key.includes("Export"))); const importComponents = Object.fromEntries(Object.entries(app._context.components).filter(([key, value]) => key.includes("Import"))); -console.log(exportComponents); -app.provide('exportComponents', exportComponents); -console.log(importComponents); +LOG.info("Mounted import components:", importComponents); app.provide('importComponents', importComponents); +LOG.info("Mounted export components:", exportComponents); +app.provide('exportComponents', exportComponents); app.mount('#app'); diff --git a/src/plugins/Imports/JsonImportPlugin.vue b/src/plugins/Imports/JsonImportPlugin.vue deleted file mode 100644 index ea0ba0c..0000000 --- a/src/plugins/Imports/JsonImportPlugin.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - - diff --git a/src/plugins/Imports/ReqifImportPlugin.vue b/src/plugins/Imports/ReqifImportPlugin.vue deleted file mode 100644 index 4db5804..0000000 --- a/src/plugins/Imports/ReqifImportPlugin.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - diff --git a/src/plugins/Exports/JsonExportPlugin.vue b/src/plugins/export/jsonld/export-jsonld.vue similarity index 100% rename from src/plugins/Exports/JsonExportPlugin.vue rename to src/plugins/export/jsonld/export-jsonld.vue diff --git a/src/plugins/Exports/json-export-plugin.ts b/src/plugins/export/jsonld/mount-export-jsonld.ts similarity index 77% rename from src/plugins/Exports/json-export-plugin.ts rename to src/plugins/export/jsonld/mount-export-jsonld.ts index 86ca2e5..bf24dbf 100644 --- a/src/plugins/Exports/json-export-plugin.ts +++ b/src/plugins/export/jsonld/mount-export-jsonld.ts @@ -1,5 +1,5 @@ import { App, Plugin } from 'vue'; -import JsonExportComponent from "./JsonExportPlugin.vue"; +import JsonExportComponent from "./export-jsonld.vue"; const jsonExportPlugin: Plugin = { install(app: App) { @@ -12,7 +12,7 @@ const jsonExportPlugin: Plugin = { // }; // global component - app.component('JsonExportComponent', JsonExportComponent); + app.component('Export-JSONLD', JsonExportComponent); } } diff --git a/src/plugins/Exports/RdfExportPlugin.vue b/src/plugins/export/ttl/export-ttl.vue similarity index 100% rename from src/plugins/Exports/RdfExportPlugin.vue rename to src/plugins/export/ttl/export-ttl.vue diff --git a/src/plugins/Exports/rdf-export-plugin.ts b/src/plugins/export/ttl/mount-export-ttl.ts similarity index 78% rename from src/plugins/Exports/rdf-export-plugin.ts rename to src/plugins/export/ttl/mount-export-ttl.ts index 1fb2aa7..a99aacb 100644 --- a/src/plugins/Exports/rdf-export-plugin.ts +++ b/src/plugins/export/ttl/mount-export-ttl.ts @@ -1,5 +1,5 @@ import { App, Plugin } from 'vue'; -import RdfExportComponent from "./RdfExportPlugin.vue"; +import RdfExportComponent from "./export-ttl.vue"; const rdfExportPlugin: Plugin = { install(app: App, options?) { @@ -12,7 +12,7 @@ const rdfExportPlugin: Plugin = { // }; // global component - app.component('RdfExportComponent', RdfExportComponent); + app.component('Export-TTL', RdfExportComponent); } } diff --git a/src/plugins/import/jsonld/import-jsonld.vue b/src/plugins/import/jsonld/import-jsonld.vue new file mode 100644 index 0000000..fa327e4 --- /dev/null +++ b/src/plugins/import/jsonld/import-jsonld.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/plugins/Imports/json-import-plugin.ts b/src/plugins/import/jsonld/mount-import-jsonld.ts similarity index 77% rename from src/plugins/Imports/json-import-plugin.ts rename to src/plugins/import/jsonld/mount-import-jsonld.ts index 7147a03..47d5825 100644 --- a/src/plugins/Imports/json-import-plugin.ts +++ b/src/plugins/import/jsonld/mount-import-jsonld.ts @@ -1,5 +1,5 @@ import { App, Plugin } from 'vue'; -import JsonImportComponent from "./JsonImportPlugin.vue"; +import JsonImportComponent from "./import-jsonld.vue"; const jsonImportPlugin: Plugin = { install(app: App) { @@ -12,7 +12,7 @@ const jsonImportPlugin: Plugin = { // }; // global component - app.component('JsonImportComponent', JsonImportComponent); + app.component('Import-JSONLD', JsonImportComponent); } } diff --git a/src/plugins/import/reqif/import-reqif.vue b/src/plugins/import/reqif/import-reqif.vue new file mode 100644 index 0000000..0a0fcab --- /dev/null +++ b/src/plugins/import/reqif/import-reqif.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/src/plugins/Imports/reqif-import-plugin.ts b/src/plugins/import/reqif/mount-import-reqif.ts similarity index 76% rename from src/plugins/Imports/reqif-import-plugin.ts rename to src/plugins/import/reqif/mount-import-reqif.ts index 5383e30..1189cd1 100644 --- a/src/plugins/Imports/reqif-import-plugin.ts +++ b/src/plugins/import/reqif/mount-import-reqif.ts @@ -1,5 +1,5 @@ import { App, Plugin } from 'vue'; -import ReqifImportComponent from "./ReqifImportPlugin.vue"; +import ReqifImportComponent from "./import-reqif.vue"; const reqifImportPlugin: Plugin = { install(app: App) { @@ -12,7 +12,7 @@ const reqifImportPlugin: Plugin = { // }; // global component - app.component('ReqifImportComponent', ReqifImportComponent); + app.component('Import-ReqIF', ReqifImportComponent); } } diff --git a/src/plugins/import/xml/import-xml.vue b/src/plugins/import/xml/import-xml.vue new file mode 100644 index 0000000..19fab57 --- /dev/null +++ b/src/plugins/import/xml/import-xml.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/src/plugins/import/xml/import-xml.vue.new b/src/plugins/import/xml/import-xml.vue.new new file mode 100644 index 0000000..34a39ef --- /dev/null +++ b/src/plugins/import/xml/import-xml.vue.new @@ -0,0 +1,492 @@ + + + + + + diff --git a/src/plugins/import/xml/mount-import-xml.ts b/src/plugins/import/xml/mount-import-xml.ts new file mode 100644 index 0000000..1cf60cd --- /dev/null +++ b/src/plugins/import/xml/mount-import-xml.ts @@ -0,0 +1,69 @@ +/*! + * XML Import Plugin Registration + * Copyright 2025 GfSE (https://gfse.org) + * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + */ +/** + * Mounts the XML import plugin with the Vue application + * + * Usage in main.ts: + * import { xmlImportPlugin } from './plugins/import/xml/mount-import-xml'; + * + * app.use(xmlImportPlugin); + */ + +import type { App, Plugin } from 'vue'; +import XmlImportPlugin from './import-xml.vue'; + +/** + * Plugin configuration options + */ +export interface XmlImportPluginOptions { + /** + * Maximum file size in bytes (default: 6MB) + */ + maxFileSize?: number; + + /** + * Custom error handler + */ + onError?: (error: Error) => void; +} + +/** + * XML Import Plugin installer + * Implements Vue Plugin interface for use with app.use() + */ +export const xmlImportPlugin: Plugin = { + install(app: App, options: XmlImportPluginOptions = {}) { + // Store options in app.config.globalProperties for component access + app.config.globalProperties.$xmlImportOptions = { + maxFileSize: options.maxFileSize || 6 * 1024 * 1024, // 6MB default + onError: options.onError || ((error: Error) => console.error('XML Import Error:', error)) + }; + + // Mount component globally + app.component('Import-XML', XmlImportPlugin); + + // all mounted components are logged in main.ts ... + } +}; + +/** + * Export business logic for programmatic use + */ +// export { XmlImporter } from '../../../common-code/import/xml/import-xml'; + +/** + * Type declarations for global properties + */ +declare module '@vue/runtime-core' { + interface ComponentCustomProperties { + $xmlImportOptions?: { + maxFileSize: number; + onError: (error: Error) => void; + }; + } +} + +export default xmlImportPlugin; diff --git a/src/router/index.ts b/src/router/index.ts index 0671a5d..1de1fe8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,29 +1,29 @@ import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; -import Home from '@/components/Home.vue'; -import Dashboards from '@/components/Dashboards.vue'; -import Interfaces from '@/components/Interfaces.vue'; -import Viewing from '@/components/Viewing.vue'; +import AppHome from '@/components/Home.vue'; +import AppDashboards from '@/components/Dashboards.vue'; +import AppInterfaces from '@/components/Interfaces.vue'; +import AppView from '@/components/Viewing.vue'; const routes: Array = [ { path: '/', name: 'Home', - component: Home, + component: AppHome, }, { path: '/dashboards', name: 'Dashboards', - component: Dashboards, + component: AppDashboards, }, { path: '/interfaces', name: 'Interfaces', - component: Interfaces, + component: AppInterfaces, }, { path: '/viewing', name: 'Viewing', - component: Viewing, + component: AppView, } ]; diff --git a/src/styles/main.css b/src/styles/main.css new file mode 100644 index 0000000..dce3931 --- /dev/null +++ b/src/styles/main.css @@ -0,0 +1,32 @@ +/* The google web-fonts Roboto and Montserrat must be loaded in the app's index.html */ +body, .v-application { + font-family: 'Roboto', Arial, sans-serif; + font-weight: 400; +} + +h1, h2, h3, +.banner-title, +.v-app-bar-title, +.v-toolbar-title, +.v-toolbar-title__placeholder { + font-family: 'Montserrat', 'Roboto', Arial, sans-serif !important; + font-weight: 400 !important; +} + +h1 { + font-size: 1.8rem; +} + +h2 { + font-size: 1.5rem; +} + +h3 { + font-size: 1.2rem; +} +.banner-title, +.v-app-bar-title, +.v-toolbar-title, +.v-toolbar-title__placeholder { + font-size: 1.8rem; +} diff --git a/src/utils/import/ReqIF/import-reqif.ts b/src/utils/import/ReqIF/import-reqif.ts deleted file mode 100644 index 175a590..0000000 --- a/src/utils/import/ReqIF/import-reqif.ts +++ /dev/null @@ -1,172 +0,0 @@ -/*! - * Imports a ReqIF XML document and transforms it using the ReqIF-to-PIG stylesheet. - * Copyright 2025 GfSE (https://gfse.org) - * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - * We appreciate any correction, comment or contribution as Github issue (https://github.com/GfSE/CASCaDE-Reference-Implementation/issues) - */ -/** - * Imports a ReqIF XML document and transforms it using a ReqIF-to-PIG stylesheet. - * Authors: oskar.dungern@gfse.org - * - * Security note: Uses saxon-js which has a transitive dependency on @xmldom/xmldom - * with known vulnerabilities. Input is validated and size-limited. See docs/SECURITY.md - * - * Design Decisions: - * - SEF stylesheet is loaded from public/assets/xslt/ in both environments - * - Browser: fetches via HTTP from /assets/xslt/ - * - Node.js: reads from local public/assets/xslt/ directory - * - Single source of truth: SEF file stored only in public/assets/xslt/ - * - * ToDo: - * - Decide whether the file is read within or outside the import function. - * Here it is outside, but in case of importXML() and importSJSONLD(), it is inside. - * - Extend the constraint checks - very limited now. - * - * @param xmlString - The XML document to import - * @param filename - The name of the file being imported (for error messages) - * @returns IRsp containing the transformed XML document or error messages - */ - -import { LOG } from '../../lib/helpers'; -import { PIN } from '../../lib/platform-independence'; -import { IRsp, /*Rsp,*/ Msg, rspOK } from '../../lib/messages'; -import { APackage, TPigItem, stringXML } from '../../schemas/pig/ts/pig-metaclasses'; -import { ConstraintCheckType } from '../../schemas/pig/ts/pig-package-constraints'; - -const MAX_XML_SIZE = 4 * 1024 * 1024; - -/** - * Get platform-appropriate path to ReqIF-to-PIG stylesheet - * - Browser: URL to public asset (/assets/xslt/) - * - Node.js: Local filesystem path to public directory (public/assets/xslt/) - * - * @returns Path/URL to ReqIF-to-PIG.sef.json - */ -function getStylesheetPath(): string { - if (PIN.isBrowserEnv()) { - // Browser: fetch from public directory via HTTP - const baseUrl = window.location.origin; - return `${baseUrl}/assets/xslt/ReqIF-to-PIG.sef.json`; - } else { - // Node.js: read from local public directory - return './public/assets/xslt/ReqIF-to-PIG.sef.json'; - } -} - -export async function importReqif( - xmlString: stringXML, - filename: string - // options?: any -): Promise> { - // Check file extension - if (!filename.toLowerCase().endsWith('.reqif')) { - return Msg.create(660, filename, 'expected .reqif file extension'); - } - - // Security: Size limit check - if (xmlString.length > MAX_XML_SIZE) { - return Msg.create(660, filename, `file too large (max ${MAX_XML_SIZE / 1024 / 1024}MB)`); - } - - // Security: Basic XML structure validation before parsing - if (!xmlString.trim().startsWith('`); - // Check for parsing errors - const sourceError = PIN.getXmlParseError(xmlDoc); - if (sourceError) { - return Msg.create(660, filename, sourceError.textContent ?? 'Unknown error'); - } - - // Validate that it's a ReqIF XML document - if (!isValidReqIFDocument(xmlDoc)) { - return Msg.create(660, filename, 'missing required ReqIF namespace or root element'); - } - - // In future, we will support different transformation methods: - // const method = options?.method || 'XSLT'; - - // Get platform-appropriate stylesheet path - const stylesheetPath = getStylesheetPath(); - LOG.debug(`importReqIF: using stylesheet path: ${stylesheetPath}`); - - // LOG.debug(`importReqIF: starting transformation using stylesheet ${stylesheetPath}...`); - // Transform the document - const rsp = await PIN.transformXSL(xmlString, stylesheetPath); - - if (!rsp.ok) { - return Msg.create(660, filename, rsp.statusText ?? 'Unknown error'); - } - - // LOG.debug('importReqIF: transformation successful', rsp.response); - const aPackage = new APackage().setXML( - rsp.response as string, - // input has only instances, so omit constraint checks on classes: - { - checkConstraints: [ - ConstraintCheckType.UniqueIds - // ConstraintCheckType.aPropertyHasClass, - // ConstraintCheckType.aLinkHasClass, - // ConstraintCheckType.anEntityHasClass, - // ConstraintCheckType.aRelationshipHasClass, - ] as ConstraintCheckType[] - } - ); - - // Check if package was successfully created - if (!aPackage.status().ok) { - return aPackage.status(); - } - - // allItems[0] is the package itself, rest are graph items: - const allItems = aPackage.getItems(); - - // const actualCount = allItems.length - 1; - // LOG.info(`importReqIF: successfully instantiated ${actualCount} items`); - - // Return all items (package + graph items) - const result = rspOK; - result.response = allItems; - result.responseType = 'json'; - - return result as IRsp; -} - -/** - * Validates that the XML document is a valid ReqIF document. - * - * @param xmlDoc - The XML document to validate - * @returns True if the document is a valid ReqIF document - */ -function isValidReqIFDocument(xmlDoc: Document): boolean { - const rootElement = xmlDoc.documentElement; - - if (!rootElement) { - return false; - } - - // Check for ReqIF namespace - const reqifNamespace = 'http://www.omg.org/spec/ReqIF/20110401/reqif.xsd'; - const hasReqIFNamespace = rootElement.namespaceURI === reqifNamespace || - rootElement.getAttribute('xmlns') === reqifNamespace || - rootElement.lookupNamespaceURI('reqif') === reqifNamespace; - - // Check for REQ-IF root element - const isReqIFRoot = rootElement.localName === 'REQ-IF' || - rootElement.tagName === 'REQ-IF' || - rootElement.tagName === 'reqif:REQ-IF'; - - return hasReqIFNamespace && isReqIFRoot; -} diff --git a/src/utils/import/jsonld/import-package-jsonld.ts b/src/utils/import/jsonld/import-package-jsonld.ts deleted file mode 100644 index c03aaa3..0000000 --- a/src/utils/import/jsonld/import-package-jsonld.ts +++ /dev/null @@ -1,118 +0,0 @@ -/*! Cross-environment JSON-LD importer. - * Copyright 2025 GfSE (https://gfse.org) - * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - */ -/** - * Cross-environment JSON-LD importer. - * - Accepts a Node file path, an http(s) URL string or a browser File/Blob. - * - Extracts elements from '@graph' (or 'graph'), converts JSON-LD keys to internal keys - * and instantiates matching PIG class instances where possible. - * - * Dependencies: - * Authors: oskar.dungern@gfse.org, .. - * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - * We appreciate any correction, comment or contribution as Github issue (https://github.com/GfSE/CASCaDE-Reference-Implementation/issues) - * - * Usage: - * - Node: await importJsonLd('C:/path/to/file.jsonld') - * - URL: await importJsonLd('https://example/.../doc.jsonld') - * - Browser: await importJsonLd(fileInput.files[0]) - */ - -import { IRsp, rspOK, Msg } from '../../lib/messages'; -import { LOG } from '../../lib/helpers'; -import { PIN } from '../../lib/platform-independence'; -import { APackage, TPigItem } from '../../schemas/pig/ts/pig-metaclasses'; -import { SCH_LD } from '../../schemas/pig/jsonld/pig-schemata-jsonld'; -// import { ConstraintCheckType } from '../../schemas/pig/ts/pig-package-constraints'; - -/** - * JSON-LD document structure - */ -interface JsonLdDocument { - '@context'?: unknown; - '@graph'?: unknown[]; - '@id'?: string; - '@type'?: string | string[]; - [key: string]: unknown; -} - -/** - * Import JSON-LD document and instantiate PIG items - * @param source - File path, URL, or File/Blob object - * @returns IRsp with array of TPigItem (first item is APackage, rest are graph items) - */ -export async function importJSONLD(source: string | File | Blob): Promise { - // LOG.debug('importJSONLD: starting import from source', source); - const rsp = await PIN.readFileAsText(source); - if (!rsp.ok) - return rsp; - - const text = rsp.response as string; - - let doc: JsonLdDocument; - try { - doc = JSON.parse(text) as JsonLdDocument; - } catch (err: unknown) { - const errorMessage = err instanceof Error ? err.message : String(err); - return Msg.create(690, 'JSON-LD', errorMessage); - } - - // Validate entire JSON-LD document structure - const isValidPackage = await SCH_LD.validatePackageLD(doc); - if (!isValidPackage) { - const errors = await SCH_LD.getValidatePackageLDErrors(); - LOG.error('JSON-LD package validation failed:', errors); - return Msg.create(697, 'JSON-LD', errors); - } - - // Instantiate APackage and load the document - const aPackage = new APackage().setJSONLD(doc); // apply all constraint checks by default - /* keeping it because it will be needed when implementing further consistency checks: - const aPackage = new APackage().setJSONLD( - doc, - // some examples are incomplete, so we skip the tests for specializes: - {checkConstraints: [ - ConstraintCheckType.UniqueIds, - ConstraintCheckType.aPropertyHasClass, - ConstraintCheckType.aLinkHasClass, - ConstraintCheckType.anEntityHasClass, - ConstraintCheckType.aRelationshipHasClass, - ]} - ); - - // Check if package was successfully created - if (!aPackage.status().ok) { - return aPackage.status(); - } */ - - const allItems = aPackage.getItems(); - - // allItems[0] is the package itself, rest are graph items - - const expectedCount = doc['@graph']?.length || 0; - const actualCount = allItems.length - 1; - - let result: IRsp; - if (actualCount === expectedCount) { - LOG.info(`importJSONLD: successfully instantiated package with all ${actualCount} items`); - result = rspOK; - } else { - let str = '\nErroneous items:'; - for (let i = 1; i < allItems.length; i++) { - const st = allItems[i].status(); - if(!st.ok) - str += `\n- graph[${i}]: (${st.status}) /${st.statusText}`; - } - LOG.warn(`importJSONLD: instantiated ${actualCount} of ${expectedCount} items` + str); - - result = Msg.create(691, 'JSON-LD', actualCount, expectedCount); - } - - // Return all items (package + graph items) - result.response = allItems; - result.responseType = 'json'; - - return result as IRsp; -} - diff --git a/src/utils/import/xml/import-package-xml.ts b/src/utils/import/xml/import-package-xml.ts deleted file mode 100644 index 8db7585..0000000 --- a/src/utils/import/xml/import-package-xml.ts +++ /dev/null @@ -1,109 +0,0 @@ -/*! Cross-environment XML importer. - * Copyright 2025 GfSE (https://gfse.org) - * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - */ -/** - * Cross-environment XML importer. - * - Accepts a Node file path, an http(s) URL string or a browser File/Blob. - * - Parses XML document, converts XML structure to internal keys - * and instantiates matching PIG class instances where possible. - * - * Authors: oskar.dungern@gfse.org - * - * Usage: - * - Node: await importXML('C:/path/to/file.xml') - * - URL: await importXML('https://example/.../doc.xml') - * - Browser: await importXML(fileInput.files[0]) - */ - -import { IRsp, rspOK, Msg } from '../../lib/messages'; -import { LOG } from '../../lib/helpers'; -import { PIN } from '../../lib/platform-independence'; -import { APackage, TPigItem } from '../../schemas/pig/ts/pig-metaclasses'; -//import { ConstraintCheckType } from '../../schemas/pig/ts/pig-package-constraints'; - -/** - * Import XML document and instantiate PIG items - * @param source - File path, URL, or File/Blob object - * @returns IRsp with array of TPigItem (first item is APackage, rest are graph items) - */ -export async function importXML(source: string | File | Blob): Promise { - const rsp = await PIN.readFileAsText(source); - if (!rsp.ok) - return rsp; - - const xmlString = rsp.response as string; - // LOG.info('importXML: loaded text length ' + xmlString.length); - - // Optional: Pre-validate XML syntax - try { - const parser = PIN.createDOMParser(); - - const doc = parser.parseFromString(xmlString, 'text/xml'); - const parserError = PIN.getXmlParseError(doc); - - if (parserError) { - const errorMessage = parserError.textContent || 'Unknown XML parsing error'; - return Msg.create(690, 'XML', errorMessage); - } - } catch (err: any) { - return Msg.create(690, 'XML', err?.message ?? err); - } - /* - // Validate entire XML document structure - const isValidPackage = await SCH_XSD.validatePackageXML(doc); - if (!isValidPackage) { - const errors = await SCH_XSD.getValidatePackageXMLErrors(); - LOG.error('XML package validation failed:', errors); - return Msg.create(697, 'XML', errors); - } - */ - - // Instantiate APackage directly from XML string - const aPackage = new APackage().setXML(xmlString); // apply all constraint checks by default -/* keeping it because it will be needed when implementing further consistency checks: - const aPackage = new APackage().setXML( - xmlString, - // some examples are incomplete, so we skip the tests for specializes: - [ - ConstraintCheckType.UniqueIds, - ConstraintCheckType.aPropertyHasClass, - ConstraintCheckType.aLinkHasClass, - ConstraintCheckType.anEntityHasClass, - ConstraintCheckType.aRelationshipHasClass, - ] - ); - - // Check if package was successfully created - if (!aPackage.status().ok) { - return aPackage.status(); - } -*/ - // allItems[0] is the package itself, rest are graph items: - const allItems = aPackage.getItems(); - - const expectedCount = aPackage.graph?.length || 0; - const actualCount = allItems.length - 1; - - let result: IRsp; - if (actualCount === expectedCount) { - LOG.info(`importXML: successfully instantiated package with all ${actualCount} items`); - result = rspOK; - } else { - let str = '\nErroneous items:'; - for (let i = 1; i < allItems.length; i++) { - const st = allItems[i].status(); - if (!st.ok) - str += `\n- graph[${i}]: (${st.status}) /${st.statusText}`; - } - LOG.warn(`importJXML: instantiated ${actualCount} of ${expectedCount} items` + str); - - result = Msg.create(691, 'XML', actualCount, expectedCount); - } - - // Return all items (package + graph items) - result.response = allItems; - result.responseType = 'json'; - - return result as IRsp; -} diff --git a/src/utils/lib/build-info.ts b/src/utils/lib/build-info.ts deleted file mode 100644 index 80e367c..0000000 --- a/src/utils/lib/build-info.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Auto-generated by scripts/generate-build-info.js - DO NOT EDIT -// Generated at: 2026-02-12T16:29:56.269Z - -export const BUILD_INFO = { - buildTime: '2026-02-12T16:29:56.269Z', - gitCommit: '339dc77', - gitBranch: '50-html-loader', - gitDirty: false -}; diff --git a/src/utils/schemas/pig/jsonld/pig-schemata-jsonld.ts.goodButReplaced b/src/utils/schemas/pig/jsonld/pig-schemata-jsonld.ts.goodButReplaced deleted file mode 100644 index 7f64c56..0000000 --- a/src/utils/schemas/pig/jsonld/pig-schemata-jsonld.ts.goodButReplaced +++ /dev/null @@ -1,711 +0,0 @@ -/*! JSON-LD SCHEMATA for PIG items - * Copyright 2025 GfSE (https://gfse.org) - * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - */ -/** JSON-LD SCHEMATA for PIG items: Property, Link, Entity, Relationship, AnEntity, ARelationship - * These schemas validate the JSON-LD representation (with @id, @type, @value, etc.) - * - * Dependencies: ajv (Another JSON Schema Validator) https://ajv.js.org/ - * Authors: oskar.dungern@gfse.org, .. - * We appreciate any correction, comment or contribution as Github issue (https://github.com/GfSE/CASCaDE-Reference-Implementation/issues) - * - * Design decisions: - * - in this solution, the JSON-LD schemata are hard-coded in TypeScript - * while the preferred solution is to load them from external files. - * - use JSON Schema draft-07 (widely supported) - * - use ajv for validation (fast, popular) - * - these schemas validate JSON-LD documents (@graph, @context, @id, @type) - * - separate from internal JSON schemas (pig-schemata.ts) - * - * Limitations: - * - xs:datatype values are only pattern-validated here; specific accepted values are validated in code - * - further constraints (e.g. maxCount >= minCount) are validated in code - * - eligible values in Property only for string values; other datatypes to be implemented - * - * ToDo: - * - load schemata from external files, as soon as a server with CORS enabled is available -*/ - -import { ajv } from '../../../../plugins/ajv'; - -const SCHEMA_PATH = 'http://product-information-graph.org/schema/2026-01-12/jsonld/'; -const ID_NAME_PATTERN = '^(?:[A-Za-z0-9_\\-]+:[^:\\s]+|https?:\\/\\/[^\\s]+)$'; - -/* Shared JSON-LD definitions */ -const JSONLD_DEFS = { - idString: { - type: 'string', - pattern: ID_NAME_PATTERN - }, - idObject: { - type: 'object', - required: ['@id'], - properties: { - '@id': { $ref: '#/$defs/idString' } - }, - additionalProperties: false - }, - languageValue: { - type: 'object', - required: ['@value'], - properties: { - '@value': { type: 'string' }, - '@language': { type: 'string' } - }, - additionalProperties: false - } -}; - -/* PROPERTY_LD_SCHEMA: validates JSON-LD representation of IProperty */ -const PROPERTY_LD_SCHEMA = { - $schema: 'http://json-schema.org/draft-07/schema#', - $id: `${SCHEMA_PATH}Property`, - type: 'object', - properties: { - '@id': { $ref: '#/$defs/idString' }, - '@type': { $ref: '#/$defs/idString' }, - 'pig:specializes': { $ref: '#/$defs/idObject' }, - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:Property'], - description: 'The PigItemType for pig:Property' - } - }, - additionalProperties: false - }, - 'dcterms:title': { - type: 'array', - minItems: 1, - items: { $ref: '#/$defs/languageValue' } - }, - 'dcterms:description': { - type: 'array', - minItems: 1, - items: { $ref: '#/$defs/languageValue' } - }, - 'sh:datatype': { $ref: '#/$defs/idObject' }, - 'sh:minCount': { type: 'number' }, - 'sh:maxCount': { type: 'number' }, - 'sh:maxLength': { type: 'number' }, - 'sh:minInclusive': { type: 'number' }, - 'sh:maxInclusive': { type: 'number' }, - 'sh:pattern': { type: 'string' }, - 'pig:unit': { type: 'string' }, - 'sh:defaultValue': { type: 'string' }, - 'pig:eligibleValue': { - type: 'array', - items: { - type: 'object', - required: ['@id', 'dcterms:title'], - properties: { - '@id': { $ref: '#/$defs/idString' }, - 'dcterms:title': { - type: 'array', - minItems: 1, - items: { $ref: '#/$defs/languageValue' } - } - }, - additionalProperties: false - } - }, - 'pig:composedProperty': { - type: 'array', - items: { $ref: '#/$defs/idObject' } - } - }, - required: ['@id', 'pig:itemType', 'dcterms:title', 'sh:datatype'], - oneOf: [ - { required: ['@type'] }, - { required: ['pig:specializes'] } - ], - additionalProperties: false, - $defs: JSONLD_DEFS -}; -/* LINK_LD_SCHEMA: validates JSON-LD representation of ILink */ -const LINK_LD_SCHEMA = { - $schema: 'http://json-schema.org/draft-07/schema#', - $id: `${SCHEMA_PATH}Link`, - type: 'object', - properties: { - '@id': { $ref: '#/$defs/idString' }, - '@type': { $ref: '#/$defs/idString' }, - 'pig:specializes': { $ref: '#/$defs/idObject' }, - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:Link'], - description: 'The PigItemType for pig:Property' - } - }, - additionalProperties: false - }, - 'dcterms:title': { - type: 'array', - minItems: 1, - items: { $ref: '#/$defs/languageValue' } - }, - 'dcterms:description': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'pig:eligibleEndpoint': { - type: 'array', - minItems: 1, - items: { $ref: '#/$defs/idObject' } - } - }, - required: ['@id', 'pig:itemType', 'dcterms:title', 'pig:eligibleEndpoint'], - oneOf: [ - { required: ['@type'] }, - { required: ['pig:specializes'] } - ], - additionalProperties: false, - $defs: JSONLD_DEFS -}; - -/* ENTITY_LD_SCHEMA: validates JSON-LD representation of IEntity */ -const ENTITY_LD_SCHEMA = { - $schema: 'http://json-schema.org/draft-07/schema#', - $id: `${SCHEMA_PATH}Entity`, - type: 'object', - properties: { - '@id': { $ref: '#/$defs/idString' }, - '@type': { $ref: '#/$defs/idString' }, - 'pig:specializes': { $ref: '#/$defs/idObject' }, - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:Entity'], - description: 'The PigItemType for pig:Property' - } - }, - additionalProperties: false - }, - 'dcterms:title': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'dcterms:description': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'pig:eligibleProperty': { - type: 'array', - items: { $ref: '#/$defs/idObject' } - }, - 'pig:eligibleTargetLink': { - type: 'array', - items: { $ref: '#/$defs/idObject' } - }, - 'pig:icon': { - type: 'object', - properties: { - '@value': { type: 'string' } - } - } - }, - required: ['@id', 'pig:itemType', 'dcterms:title'], - oneOf: [ - { required: ['@type'] }, - { required: ['pig:specializes'] } - ], - additionalProperties: false, - $defs: JSONLD_DEFS -}; - -/* RELATIONSHIP_LD_SCHEMA: validates JSON-LD representation of IRelationship */ -const RELATIONSHIP_LD_SCHEMA = { - $schema: 'http://json-schema.org/draft-07/schema#', - $id: `${SCHEMA_PATH}Relationship`, - type: 'object', - properties: { - '@id': { $ref: '#/$defs/idString' }, - '@type': { $ref: '#/$defs/idString' }, - 'pig:specializes': { $ref: '#/$defs/idObject' }, - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:Relationship'], - description: 'The PigItemType for pig:Property' - } - }, - additionalProperties: false - }, - 'dcterms:title': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'dcterms:description': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'pig:eligibleProperty': { - type: 'array', - items: { $ref: '#/$defs/idObject' } - }, - 'pig:eligibleSourceLink': { $ref: '#/$defs/idObject' }, - 'pig:eligibleTargetLink': { $ref: '#/$defs/idObject' }, - 'pig:icon': { - type: 'object', - properties: { - '@value': { type: 'string' } - } - } - }, - required: ['@id', 'pig:itemType', 'dcterms:title'], - oneOf: [ - { required: ['@type'] }, - { required: ['pig:specializes'] } - ], - additionalProperties: false, - $defs: JSONLD_DEFS -}; - -/* ANENTITY_LD_SCHEMA: validates JSON-LD representation of IAnEntity */ -const ANENTITY_LD_SCHEMA = { - $schema: 'http://json-schema.org/draft-07/schema#', - $id: `${SCHEMA_PATH}AnEntity`, - type: 'object', - properties: { - '@id': { $ref: '#/$defs/idString' }, - '@type': { $ref: '#/$defs/idString' }, - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:anEntity'], - description: 'The PigItemType for pig:anEntity' - } - }, - additionalProperties: false - }, - 'pig:revision': { type: 'string' }, - 'pig:priorRevision': { - type: 'array', - items: { type: 'string' } - }, - 'dcterms:modified': { type: 'string', format: 'date-time' }, - 'dcterms:creator': { type: 'string' }, - 'dcterms:title': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'dcterms:description': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - } - }, - patternProperties: { - '^(?!pig:itemType|pig:revision|pig:priorRevision|@id|@type|dcterms:modified|dcterms:creator|dcterms:title|dcterms:description)([A-Za-z0-9_\\-]+:[^:\\s]+|https?:\\/\\/[^\\s]+)$': { - type: 'array', - items: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:aProperty', 'pig:aTargetLink'] - } - }, - additionalProperties: false - }, - '@value': { type: 'string' }, - '@id': { $ref: '#/$defs/idString' } - }, - required: ['pig:itemType'], - oneOf: [ - { - // aProperty with direct value: must have @value - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:aProperty' } - } - } - }, - required: ['@value'], - not: { required: ['@id'] } - }, - { - // aProperty with enumeration reference: must have @id - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:aProperty' } - } - } - }, - required: ['@id'], - not: { required: ['@value'] } - }, - { - // aTargetLink: must have @id - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:aTargetLink' } - } - } - }, - required: ['@id'], - not: { required: ['@value'] } - } - ], - additionalProperties: false - } - } - }, - required: ['@id', 'pig:itemType', '@type', 'dcterms:modified'], - anyOf: [ - { - required: ['dcterms:title'], - properties: { 'dcterms:title': { type: 'array', minItems: 1 } } - }, - { - required: ['dcterms:description'], - properties: { 'dcterms:description': { type: 'array', minItems: 1 } } - } - ], - additionalProperties: false, - $defs: JSONLD_DEFS -}; - -/* ARELATIONSHIP_LD_SCHEMA: validates JSON-LD representation of IARelationship */ -const ARELATIONSHIP_LD_SCHEMA = { - $schema: 'http://json-schema.org/draft-07/schema#', - $id: `${SCHEMA_PATH}ARelationship`, - type: 'object', - properties: { - '@id': { $ref: '#/$defs/idString' }, - '@type': { $ref: '#/$defs/idString' }, - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:aRelationship'], - description: 'The PigItemType for pig:aRelationship' - } - }, - additionalProperties: false - }, - 'pig:revision': { type: 'string' }, - 'pig:priorRevision': { - type: 'array', - items: { type: 'string' } - }, - 'dcterms:modified': { type: 'string', format: 'date-time' }, - 'dcterms:creator': { type: 'string' }, - 'dcterms:title': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'dcterms:description': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - } - }, - patternProperties: { - // Match configurable properties and links, but exclude standard PIG properties - // Negative lookahead: don't match properties that are already defined in 'properties' - '^(?!pig:itemType|pig:revision|pig:priorRevision|@id|@type|dcterms:modified|dcterms:creator|dcterms:title|dcterms:description)([A-Za-z0-9_\\-]+:[^:\\s]+|https?:\\/\\/[^\\s]+)$': { - type: 'array', - items: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:aProperty', 'pig:aSourceLink', 'pig:aTargetLink'] - } - }, - additionalProperties: false - }, - '@value': { type: 'string' }, - '@id': { $ref: '#/$defs/idString' } - }, - required: ['pig:itemType'], - oneOf: [ - { - // aProperty with direct value: must have @value - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:aProperty' } - } - } - }, - required: ['@value'], - not: { required: ['@id'] } - }, - { - // aProperty with enumeration reference: must have @id - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:aProperty' } - } - } - }, - required: ['@id'], - not: { required: ['@value'] } - }, - { - // aSourceLink or aTargetLink: must have @id - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { enum: ['pig:aSourceLink', 'pig:aTargetLink'] } - } - } - }, - required: ['@id'], - not: { required: ['@value'] } - } - ], - additionalProperties: false - } - } - }, - required: ['@id', 'pig:itemType', '@type', 'dcterms:modified'], - additionalProperties: false, // ✅ Strict validation enabled - $defs: JSONLD_DEFS -}; - -/* APACKAGE_LD_SCHEMA: validates a complete JSON-LD document with @graph */ -const APACKAGE_LD_SCHEMA = { - $schema: 'http://json-schema.org/draft-07/schema#', - $id: `${SCHEMA_PATH}APackage`, - type: 'object', - properties: { - '@context': { - description: 'JSON-LD context', - oneOf: [ - { type: 'object' }, - { type: 'array' }, - { type: 'string' } - ] - }, - '@id': { $ref: '#/$defs/idString' }, - '@type': { $ref: '#/$defs/idString' }, - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { - type: 'string', - enum: ['pig:aPackage'], - description: 'The PigItemType for pig:aPackage' - } - }, - additionalProperties: false - }, - 'dcterms:modified': { type: 'string', format: 'date-time' }, - 'dcterms:creator': { type: 'string' }, - 'dcterms:title': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - 'dcterms:description': { - type: 'array', - items: { $ref: '#/$defs/languageValue' } - }, - '@graph': { - type: 'array', - minItems: 0, - items: { - type: 'object', - required: ['pig:itemType'], - properties: { - 'pig:itemType': { - type: 'object', - required: ['@id'], - properties: { - '@id': { type: 'string' } - } - } - }, - // Use if-then-else chains to apply only the matching schema based on itemType; - // test the instances first: - allOf: [ - { - if: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:anEntity' } - } - } - } - }, - then: { $ref: `${SCHEMA_PATH}AnEntity` } - }, - { - if: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:aRelationship' } - } - } - } - }, - then: { $ref: `${SCHEMA_PATH}ARelationship` } - }, - { - if: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:Property' } - } - } - } - }, - then: { $ref: `${SCHEMA_PATH}Property` } - }, - { - if: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:Link' } - } - } - } - }, - then: { $ref: `${SCHEMA_PATH}Link` } - }, - { - if: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:Entity' } - } - } - } - }, - then: { $ref: `${SCHEMA_PATH}Entity` } - }, - { - if: { - type: 'object', - properties: { - 'pig:itemType': { - type: 'object', - properties: { - '@id': { const: 'pig:Relationship' } - } - } - } - }, - then: { $ref: `${SCHEMA_PATH}Relationship` } - } - ] - } - } - }, - required: ['@id', '@context', '@graph'], - additionalProperties: false, - $defs: JSONLD_DEFS -}; - -// Register all schemata before compilation: -ajv.addSchema(PROPERTY_LD_SCHEMA); -ajv.addSchema(LINK_LD_SCHEMA); -ajv.addSchema(ENTITY_LD_SCHEMA); -ajv.addSchema(RELATIONSHIP_LD_SCHEMA); -ajv.addSchema(ANENTITY_LD_SCHEMA); -ajv.addSchema(ARELATIONSHIP_LD_SCHEMA); - -// Compile all schemata -const validatePropertyLD = ajv.compile(PROPERTY_LD_SCHEMA); -const validateLinkLD = ajv.compile(LINK_LD_SCHEMA); -const validateEntityLD = ajv.compile(ENTITY_LD_SCHEMA); -const validateRelationshipLD = ajv.compile(RELATIONSHIP_LD_SCHEMA); -const validateAnEntityLD = ajv.compile(ANENTITY_LD_SCHEMA); -const validateARelationshipLD = ajv.compile(ARELATIONSHIP_LD_SCHEMA); -const validatePackageLD = ajv.compile(APACKAGE_LD_SCHEMA); - -export const SCH_LD = { - PROPERTY_LD_SCHEMA, - validatePropertyLD, - getValidatePropertyLDErrors() { - return ajv.errorsText(validatePropertyLD.errors, { separator: '; ' }); - }, - LINK_LD_SCHEMA, - validateLinkLD, - getValidateLinkLDErrors() { - return ajv.errorsText(validateLinkLD.errors, { separator: '; ' }); - }, - ENTITY_LD_SCHEMA, - validateEntityLD, - getValidateEntityLDErrors() { - return ajv.errorsText(validateEntityLD.errors, { separator: '; ' }); - }, - RELATIONSHIP_LD_SCHEMA, - validateRelationshipLD, - getValidateRelationshipLDErrors() { - return ajv.errorsText(validateRelationshipLD.errors, { separator: '; ' }); - }, - ANENTITY_LD_SCHEMA, - validateAnEntityLD, - getValidateAnEntityLDErrors() { - return ajv.errorsText(validateAnEntityLD.errors, { separator: '; ' }); - }, - ARELATIONSHIP_LD_SCHEMA, - validateARelationshipLD, - getValidateARelationshipLDErrors() { - return ajv.errorsText(validateARelationshipLD.errors, { separator: '; ' }); - }, - APACKAGE_LD_SCHEMA, - validatePackageLD, - getValidatePackageLDErrors() { - return ajv.errorsText(validatePackageLD.errors, { separator: '; ' }); - } -}; diff --git a/tests/data/JSON-LD/11/Alice.pig.jsonld b/tests/data/JSON-LD/11/Alice.pig.jsonld index fb391cf..46b890f 100644 --- a/tests/data/JSON-LD/11/Alice.pig.jsonld +++ b/tests/data/JSON-LD/11/Alice.pig.jsonld @@ -79,7 +79,7 @@ ] }, { - "@id": "pig:HierarchyRoot", + "@id": "pig:Root", "pig:specializes": { "@id": "pig:Organizer" }, @@ -88,7 +88,7 @@ }, "dcterms:title": [ { - "@value": "Hierarchy Root", + "@value": "Tree Root", "@language": "en" } ], diff --git a/tests/data/XML/11/Alice.pig.xml b/tests/data/XML/11/Alice.pig.xml index 794b0ad..5977756 100644 --- a/tests/data/XML/11/Alice.pig.xml +++ b/tests/data/XML/11/Alice.pig.xml @@ -29,7 +29,7 @@ pig:category - + pig:Organizer Hierarchy Root A subclass of PIG organizer serving as a root for hierarchically organized graph elements. diff --git a/tests/unit/import-package-jsonld.spec.ts b/tests/unit/import-jsonld.spec.ts similarity index 86% rename from tests/unit/import-package-jsonld.spec.ts rename to tests/unit/import-jsonld.spec.ts index ff2f7c2..46eca55 100644 --- a/tests/unit/import-package-jsonld.spec.ts +++ b/tests/unit/import-jsonld.spec.ts @@ -9,10 +9,10 @@ * - add more tests as proposed in comments below - not clear yet whether expectations or processing are faulty */ -import { importJSONLD } from '../../src/utils/import/jsonld/import-package-jsonld'; -import { TPigItem } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; -import path from 'path'; -import fs from 'fs'; +import { JsonldImporter } from '../../src/common-code/import/jsonld/import-jsonld'; +import { TPigItem } from '../../src/common-code/schema/pig/ts/pig-metaclasses'; +import * as path from 'path'; +import * as fs from 'fs'; function findTestFiles(dir: string, ext: string): string[] { if (!fs.existsSync(dir)) { @@ -38,7 +38,7 @@ function findTestFiles(dir: string, ext: string): string[] { const testFilesDir = path.resolve(__dirname, '../data/JSON-LD'); const ldFiles = findTestFiles(testFilesDir, '.jsonld'); -describe('importJSONLD - Dynamic Test Files', () => { +describe('import JSONLD - Dynamic Test Files', () => { if (ldFiles.length === 0) { it.skip('No .jsonld test files found', () => { expect(true).toBe(true); @@ -66,9 +66,9 @@ describe('importJSONLD - Dynamic Test Files', () => { it(`should import ${relativePath}`, async () => { // Import JSON-LD - const rsp = await importJSONLD(ldFile); + const rsp = await JsonldImporter.import(ldFile); if (!rsp.ok) - console.warn('importJSONLD', rsp.status, rsp.statusText); + console.warn('import JSONLD', rsp.status, rsp.statusText); // Basic validation expect(rsp.status === 0 || rsp.status === 691).toBe(true); // some or all items have been processed @@ -116,27 +116,27 @@ describe('importJSONLD - Dynamic Test Files', () => { }); }); /* -describe('importJSONLD - Error Handling', () => { +describe('import JSONLD - Error Handling', () => { it('should reject non-JSON-LD files', async () => { - const rsp = await importJSONLD('{}'); + const rsp = await JsonldImporter.import('{}'); expect(rsp.ok).toBe(false); expect(rsp.statusText).toContain('.jsonld'); }); it('should reject invalid JSON', async () => { - const rsp = await importJSONLD('not valid json'); + const rsp = await JsonldImporter.import('not valid json'); expect(rsp.ok).toBe(false); expect(rsp.statusText).toContain('parse'); }); it('should reject files without @context', async () => { - const rsp = await importJSONLD('{"@graph": []}'); + const rsp = await JsonldImporter.import('{"@graph": []}'); expect(rsp.ok).toBe(false); expect(rsp.statusText).toContain('@context'); }); it('should reject files without @graph', async () => { - const rsp = await importJSONLD('{"@context": {}}'); + const rsp = await JsonldImporter.import('{"@context": {}}'); expect(rsp.ok).toBe(false); expect(rsp.statusText).toContain('@graph'); }); @@ -144,7 +144,7 @@ describe('importJSONLD - Error Handling', () => { it('should reject oversized files', async () => { const largeJson = '{"@context": {}, "@graph": [' + '{},' .repeat(1000000) + '{}]}'; - const rsp = await importJSONLD(largeJson); + const rsp = await JsonldImporter.import(largeJson); expect(rsp.ok).toBe(false); expect(rsp.statusText).toContain('too large'); }); diff --git a/tests/unit/import-reqif.spec.ts b/tests/unit/import-reqif.spec.ts index a755c1a..8c22e68 100644 --- a/tests/unit/import-reqif.spec.ts +++ b/tests/unit/import-reqif.spec.ts @@ -6,24 +6,38 @@ */ // import { IRsp } from '../../src/utils/lib/messages'; -import { PIN } from '../../src/utils/lib/platform-independence'; -import { importReqif } from '../../src/utils/import/ReqIF/import-reqif'; +import { ReqifImporter } from '../../src/common-code/import/reqif/import-reqif'; import * as path from 'path'; import * as fs from 'fs'; +function findReqifFiles(dir: string, fileList: string[] = []): string[] { + const files = fs.readdirSync(dir); + + files.forEach(file => { + const filePath = path.join(dir, file); + const stat = fs.statSync(filePath); + + if (stat.isDirectory()) { + // Recursively search subdirectories + findReqifFiles(filePath, fileList); + } else if (file.endsWith('.reqif')) { + // Add ReqIF files to the list + fileList.push(filePath); + } + }); + + return fileList; +} + describe('ReqIF Import', () => { - // List all ReqIF test files - const testDataDir = path.resolve(__dirname, '../data/ReqIF'); - const reqifFiles = fs.readdirSync(testDataDir) - .filter(file => file.endsWith('.reqif')) - .map(file => ({ - name: file, - path: path.join(testDataDir, file) - })); + + // Automatically discover all *.xml files in tests/data/ReqIF and subdirectories + const testFilesDir = path.resolve(__dirname, '../data/ReqIF'); + const reqifFiles: string[] = findReqifFiles(testFilesDir); beforeAll(() => { let str = `Found ${reqifFiles.length} ReqIF test files:`; - reqifFiles.forEach(f => str += `\n - ${f.name}`); + reqifFiles.forEach(f => str += `\n - ${path.relative(testFilesDir, f)}`); console.log(str); }); // Ensure console flush before test ends @@ -39,18 +53,14 @@ describe('ReqIF Import', () => { } }; - describe('importReqif() - Basic functionality', () => { +/* describe('import ReqIF - Basic functionality', () => { it('should transform ReqIF XML to PIG format', async () => { const testFile = reqifFiles[0]; - const fileContent = await PIN.readFileAsText(testFile.path); - if (!fileContent.ok) - logResponse('readFileAsText', fileContent); - - expect(fileContent.status).toBe(0); + console.debug(`Testing import ReqIF with ${testFile}`); - const rsp = await importReqif(fileContent.response as string, testFile.name); + const rsp = await ReqifImporter.import(testFile); if (!rsp.ok) - logResponse('importReqif', rsp); + logResponse('import ReqIF', rsp); expect(rsp.status).toBe(0); expect(rsp.response).toBeTruthy(); @@ -59,23 +69,23 @@ describe('ReqIF Import', () => { const items = rsp.response as any[]; expect(items.length).toBeGreaterThan(0); - console.log(`✓ Imported package with ${items.length-1} items from ${testFile.name}`); + console.log(`✓ Imported package with ${items.length-1} items from ${testFile}`); }); it('should validate file extension', async () => { - const result = await importReqif('', 'invalid.txt'); + const result = await ReqifImporter.import('invalid.txt'); expect(result.ok).toBe(false); // expect(result.status).not.toBe(0); expect(result.statusText).toContain('expected .reqif file extension'); }); - it('should handle invalid XML gracefully', async () => { + /* it('should handle invalid XML gracefully', async () => { const invalidXml = 'xml without closing tag'; - const result = await importReqif(invalidXml, 'invalidXML.reqif'); + const result = await ReqifImporter.import(invalidXml, 'invalidXML.reqif'); // if (!result.ok) - // logResponse('importReqif', result); + // logResponse('import ReqIF', result); expect(result.ok).toBe(false); expect(result.statusText).toBeTruthy(); @@ -87,16 +97,16 @@ describe('ReqIF Import', () => { Not a ReqIF document `; - const result = await importReqif(notReqIF, 'notReqIF.reqif'); + const result = await ReqifImporter.import(notReqIF, 'notReqIF.reqif'); // if (!result.ok) - // logResponse('importReqif', result); + // logResponse('import ReqIF', result); expect(result.status).not.toBe(0); expect(result.statusText).toContain('missing required ReqIF namespace or root element'); }); it('should handle empty content', async () => { - const result = await importReqif('', 'test.reqif'); + const result = await ReqifImporter.import('', 'test.reqif'); expect(result.status).not.toBe(0); }); @@ -104,22 +114,21 @@ describe('ReqIF Import', () => { it('should handle malformed XML', async () => { const malformedXml = ''; - const result = await importReqif(malformedXml, 'test.reqif'); + const result = await ReqifImporter.import(malformedXml, 'test.reqif'); expect(result.status).not.toBe(0); }); }); - +*/ describe('All ReqIF test files', () => { - reqifFiles.forEach(testFile => { - it(`should successfully import ${testFile.name}`, async () => { - const fileContent = await PIN.readFileAsText(testFile.path); + let processedCount = 0; - expect(fileContent.status).toBe(0); + reqifFiles.forEach(testFile => { + it(`should successfully import ${testFile}`, async () => { - const result = await importReqif(fileContent.response as string, testFile.name); + const result = await ReqifImporter.import(testFile); if (!result.ok) - logResponse(`importReqif for ${testFile.name}`, result); + logResponse(`import ReqIF for ${testFile}`, result); expect(result.status).toBe(0); expect(result.response).toBeTruthy(); @@ -130,26 +139,29 @@ describe('ReqIF Import', () => { // Log statistics const itemCount = items.length - 1; // Exclude package itself - console.log(` ✓ ${testFile.name}: ${itemCount} items`); + console.log(` ✓ ${testFile}: ${itemCount} items`); + processedCount++; }, 15000); // 15 second timeout for larger files }); + + // Verify that all discovered files were processed + it('Check the number of files processed', () => { + expect(processedCount).toBe(reqifFiles.length); + }); }); describe('Transformation validation', () => { it('should create valid PIG package with items', async () => { - const testFile = reqifFiles.find(f => f.name === 'Related-Terms.reqif'); + const testFile = reqifFiles.find(f => f.endsWith('Related-Terms.reqif')); if (!testFile) { - logResponse('find test file', { ok: false, status: 404, statusText: 'Related-Terms.reqif not found' }); - console.warn('Related-Terms.reqif not found, skipping package creation test'); + logResponse('skipping package creation test', { ok: false, status: 404, statusText: 'Related-Terms.reqif not found' }); + // console.warn('Related-Terms.reqif not found, skipping package creation test'); return; } - const fileContent = await PIN.readFileAsText(testFile.path); - - expect(fileContent.status).toBe(0); - const result = await importReqif(fileContent.response as string, testFile.name); + const result = await ReqifImporter.import(testFile); if (!result.ok) - logResponse(`importReqif for ${testFile.name}`, result); + logResponse(`import ReqIF for ${testFile}`, result); expect(result.status).toBe(0); expect(result.responseType).toBe('json'); @@ -168,18 +180,15 @@ describe('ReqIF Import', () => { }); it('should transform SpecObjects to PIG entities', async () => { - const testFile = reqifFiles.find(f => f.name === 'Related-Terms.reqif'); + const testFile = reqifFiles.find(f => f.endsWith('Related-Terms.reqif')); if (!testFile) { logResponse('find test file', { ok: false, status: 404, statusText: 'Related-Terms.reqif not found' }); return; } - const fileContent = await PIN.readFileAsText(testFile.path); - expect(fileContent.status).toBe(0); - - const result = await importReqif(fileContent.response as string, testFile.name); + const result = await ReqifImporter.import(testFile); if (!result.ok) - logResponse(`importReqif for ${testFile.name}`, result); + logResponse(`import ReqIF for ${testFile}`, result); expect(result.status).toBe(0); @@ -194,18 +203,15 @@ describe('ReqIF Import', () => { }); it('should preserve metadata in transformation', async () => { - const testFile = reqifFiles.find(f => f.name === 'Related-Terms.reqif'); + const testFile = reqifFiles.find(f => f.endsWith('Related-Terms.reqif')); if (!testFile) { logResponse('find test file', { ok: false, status: 404, statusText: 'Related-Terms.reqif not found' }); return; } - const fileContent = await PIN.readFileAsText(testFile.path); - - expect(fileContent.status).toBe(0); - const result = await importReqif(fileContent.response as string, testFile.name); + const result = await ReqifImporter.import(testFile); if (!result.ok) - logResponse(`importReqif for ${testFile.name}`, result); + logResponse(`import ReqIF for ${testFile}`, result); expect(result.status).toBe(0); @@ -220,20 +226,17 @@ describe('ReqIF Import', () => { describe('Performance', () => { it('should import ReqIF in reasonable time', async () => { - const testFile = reqifFiles.find(f => f.name === 'Related-Terms.reqif'); + const testFile = reqifFiles.find(f => f.endsWith('Related-Terms.reqif')); if (!testFile) { logResponse('find test file', { ok: false, status: 404, statusText: 'Related-Terms.reqif not found' }); return; } - const fileContent = await PIN.readFileAsText(testFile.path); - - expect(fileContent.status).toBe(0); const startTime = Date.now(); - const result = await importReqif(fileContent.response as string, testFile.name); + const result = await ReqifImporter.import(testFile); const duration = Date.now() - startTime; if (!result.ok) - logResponse(`importReqif for ${testFile.name}`, result); + logResponse(`import ReqIF for ${testFile}`, result); expect(result.status).toBe(0); expect(duration).toBeLessThan(10000); // Should complete in under 10 seconds @@ -250,10 +253,8 @@ describe('ReqIF Import', () => { const startTime = Date.now(); for (const testFile of reqifFiles.slice(0, 3)) { // Test first 3 files - const fileContent = await PIN.readFileAsText(testFile.path); - expect(fileContent.status).toBe(0); - const result = await importReqif(fileContent.response as string, testFile.name); + const result = await ReqifImporter.import(testFile); expect(result.status).toBe(0); } @@ -265,7 +266,7 @@ describe('ReqIF Import', () => { } }); - describe('Error handling', () => { +/* describe('Error handling', () => { it('should provide meaningful xml error messages', async () => { const testCases = [ { xml: '', filename: 'empty-file.reqif', expectedError: 'invalid XML structure' }, @@ -274,11 +275,11 @@ describe('ReqIF Import', () => { ]; for (const testCase of testCases) { - const result = await importReqif(testCase.xml, testCase.filename); + const result = await ReqifImporter.import(testCase.xml, testCase.filename); expect(result.status).not.toBe(0); expect(result.statusText?.toLowerCase()).toContain(testCase.expectedError.toLowerCase()); } }); - }); + }); */ }); diff --git a/tests/unit/import-package-xml.spec.ts b/tests/unit/import-xml.spec.ts similarity index 86% rename from tests/unit/import-package-xml.spec.ts rename to tests/unit/import-xml.spec.ts index d0d6dd7..0c9859f 100644 --- a/tests/unit/import-package-xml.spec.ts +++ b/tests/unit/import-xml.spec.ts @@ -7,8 +7,8 @@ import * as fs from 'fs'; import * as path from 'path'; -import { importXML } from '../../src/utils/import/xml/import-package-xml'; -import { TPigItem } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; +import { XmlImporter } from '../../src/common-code/import/xml/import-xml'; +import { TPigItem } from '../../src/common-code/schema/pig/ts/pig-metaclasses'; /** * Recursively find all *.xml files in a directory and its subdirectories @@ -35,7 +35,7 @@ function findXmlFiles(dir: string, fileList: string[] = []): string[] { return fileList; } -describe('importXML (file system)', () => { +describe('import XML (file system)', () => { // Automatically discover all *.xml files in tests/data/XML and subdirectories const testFilesDir = path.resolve(__dirname, '../data/XML'); const xmlFiles: string[] = findXmlFiles(testFilesDir); @@ -58,11 +58,11 @@ describe('importXML (file system)', () => { const relativePath = path.relative(testFilesDir, testFile); const testName = relativePath; - test(`imports ${testName} and instantiates PIG classes`, async () => { + it(`imports ${testName} and instantiates PIG classes`, async () => { // import and test - const rsp = await importXML(testFile); + const rsp = await XmlImporter.import(testFile); if (!rsp.ok) - console.warn(`importXML ${testName}:`, rsp.status, rsp.statusText); + console.warn(`import XML ${testName}:`, rsp.status, rsp.statusText); // expect status 0 (success) or 691 (partial success with warnings) expect(rsp.status === 0 || rsp.status === 691).toBe(true); @@ -89,7 +89,7 @@ describe('importXML (file system)', () => { }); // Verify that all discovered files were processed - test('Check the number of files processed', () => { + it('Check the number of files processed', () => { expect(processedCount).toBe(xmlFiles.length); }); }); diff --git a/tests/unit/pig-metaclasses-jsonld.spec.ts b/tests/unit/pig-metaclasses-jsonld.spec.ts index f9a9d5d..883f52b 100644 --- a/tests/unit/pig-metaclasses-jsonld.spec.ts +++ b/tests/unit/pig-metaclasses-jsonld.spec.ts @@ -9,13 +9,9 @@ */ import { - Property, - Link, - Entity, - Relationship, - AnEntity, - ARelationship -} from '../../src/utils/schemas/pig/ts/pig-metaclasses'; + Property, Link, Entity, Relationship, + AnEntity, ARelationship +} from '../../src/common-code/schema/pig/ts/pig-metaclasses'; describe('PIG Metaclasses JSON-LD Import', () => { describe('Property.setJSONLD()', () => { diff --git a/tests/unit/pig-metaclasses-xml.spec.ts b/tests/unit/pig-metaclasses-xml.spec.ts index 15f1cb7..03ed300 100644 --- a/tests/unit/pig-metaclasses-xml.spec.ts +++ b/tests/unit/pig-metaclasses-xml.spec.ts @@ -9,13 +9,9 @@ */ import { - Property, - Link, - Entity, - Relationship, - AnEntity, - ARelationship -} from '../../src/utils/schemas/pig/ts/pig-metaclasses'; + Property, Link, Entity, Relationship, + AnEntity, ARelationship +} from '../../src/common-code/schema/pig/ts/pig-metaclasses'; describe('PIG Metaclasses XML Import', () => { describe('Property.setXML()', () => { diff --git a/tests/unit/pig-metaclasses.spec.ts b/tests/unit/pig-metaclasses.spec.ts index c709cab..ad86bb1 100644 --- a/tests/unit/pig-metaclasses.spec.ts +++ b/tests/unit/pig-metaclasses.spec.ts @@ -17,7 +17,8 @@ import { XsDataType, PigItemType, PigItemTypeValue, IProperty, IAProperty, ILink, IEntity, IAnEntity, IRelationship, IARelationship, - Property, AProperty, Link, Entity, AnEntity, Relationship, ARelationship, ASourceLink, ATargetLink } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; + Property, AProperty, Link, Entity, AnEntity, Relationship, ARelationship, ASourceLink, ATargetLink +} from '../../src/common-code/schema/pig/ts/pig-metaclasses'; describe("PIG Metaclasses", () => { let Property_input: IProperty; diff --git a/tests/unit/pig-package-constraints-propertyCounts.spec.ts b/tests/unit/pig-package-constraints-propertyCounts.spec.ts index 5c0925b..dbc2494 100644 --- a/tests/unit/pig-package-constraints-propertyCounts.spec.ts +++ b/tests/unit/pig-package-constraints-propertyCounts.spec.ts @@ -8,8 +8,8 @@ * similar from aPackage.get(). Some properties irrelevant in this context are however missing. */ -import { checkConstraintsForPackage, ConstraintCheckType } from '../../src/utils/schemas/pig/ts/pig-package-constraints'; -import { IAPackage, APackage, PigItemType } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; +import { checkConstraintsForPackage, ConstraintCheckType } from '../../src/common-code/schema/pig/ts/pig-package-constraints'; +import { IAPackage, APackage, PigItemType } from '../../src/common-code/schema/pig/ts/pig-metaclasses'; describe('PIG Package Constraints - Property Occurrence Validation (minCount/maxCount)', () => { // Helper to create a minimal valid package diff --git a/tests/unit/pig-package-constraints-valueRanges.spec.ts b/tests/unit/pig-package-constraints-valueRanges.spec.ts index f2d4954..58b5267 100644 --- a/tests/unit/pig-package-constraints-valueRanges.spec.ts +++ b/tests/unit/pig-package-constraints-valueRanges.spec.ts @@ -9,8 +9,8 @@ */ import { describe, it, expect } from '@jest/globals'; -import { APackage } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; -import { checkConstraintsForPackage, ConstraintCheckType } from '../../src/utils/schemas/pig/ts/pig-package-constraints'; +import { APackage } from '../../src/common-code/schema/pig/ts/pig-metaclasses'; +import { checkConstraintsForPackage, ConstraintCheckType } from '../../src/common-code/schema/pig/ts/pig-package-constraints'; describe('PIG Package Constraints - Value Range Validation', () => { diff --git a/tests/unit/pig-package-constraints.spec.ts b/tests/unit/pig-package-constraints.spec.ts index 1f6ed98..48b9891 100644 --- a/tests/unit/pig-package-constraints.spec.ts +++ b/tests/unit/pig-package-constraints.spec.ts @@ -4,8 +4,8 @@ * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -import { APackage } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; -import { ConstraintCheckType } from '../../src/utils/schemas/pig/ts/pig-package-constraints'; +import { APackage } from '../../src/common-code/schema/pig/ts/pig-metaclasses'; +import { ConstraintCheckType } from '../../src/common-code/schema/pig/ts/pig-package-constraints'; describe('PIG Package Constraint Validation', () => { describe('Positive Tests - Valid Packages', () => { diff --git a/tests/unit/pig-package-gethtml.spec.ts b/tests/unit/pig-package-gethtml.spec.ts index 30def5c..4eeb1fc 100644 --- a/tests/unit/pig-package-gethtml.spec.ts +++ b/tests/unit/pig-package-gethtml.spec.ts @@ -4,8 +4,8 @@ * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -import { APackage } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; -import { ConstraintCheckType } from '../../src/utils/schemas/pig/ts/pig-package-constraints'; +import { APackage } from '../../src/common-code/schema/pig/ts/pig-metaclasses'; +import { ConstraintCheckType } from '../../src/common-code/schema/pig/ts/pig-package-constraints'; describe('PIG Package getHTML() Method', () => { describe('Valid Package with Single Entity', () => { diff --git a/tests/unit/security-html.spec.ts b/tests/unit/security-html.spec.ts index ca5fa0c..00ee48b 100644 --- a/tests/unit/security-html.spec.ts +++ b/tests/unit/security-html.spec.ts @@ -4,7 +4,7 @@ * License and terms of use: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -import { APackage, AnEntity } from '../../src/utils/schemas/pig/ts/pig-metaclasses'; +import { APackage, AnEntity } from '../../src/common-code/schema/pig/ts/pig-metaclasses'; describe('HTML Security - XSS Prevention', () => { describe('Script Injection and Event Handler Prevention', () => { diff --git a/vue.config.js b/vue.config.js index 53587b1..f93a781 100644 --- a/vue.config.js +++ b/vue.config.js @@ -46,9 +46,9 @@ module.exports = { 'Content-Security-Policy': [ "default-src 'none'", "script-src 'self' 'unsafe-eval' 'unsafe-inline'", - "style-src 'self' 'unsafe-inline'", + "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com", "img-src 'self' data:", - "font-src 'self'", + "font-src 'self' https://fonts.gstatic.com", "connect-src 'self' ws: http: https:", "base-uri 'self'", "object-src 'none'",