Uploaded image for project: 'OASIS LegalRuleML TC'
  1. OASIS LegalRuleML TC
  2. LEGALRULEML-13

XSLT for Phase 1+2+3 conversion from LegalRuleML to RDF

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      A draft XSLT (triplifyMerger.xsl) will be committed. The results of the XSLT when applied to the validated LegalRuleML instantances in examples/test_triples (normalized serialization) will also be committed, in examples/triplesCollection, and validated as RDF/XML .

      The triplifyMerger XSLT copies the triplyCollection XSLT and adds some templates, with higher priority, to implement the exceptional handling of Nodes that have both a keyref attribute and modifying properties, as attributes, child elements, text content or all of these.

      The implementation uses the user-defined function feature of XSLT 2.0 (xsl:function) to create a function that checks if an XML node is a Node that requires merging of a key-referenced element plus the modifying attributes and/or content. In particular, the function returns true if all of the following are true:
      1. local name must start with capital letter
      2. the node must have a keyref attribute
      3. the node must have at least one child element, text node or attribute that is not keyref

      This function is used to implement the following template:
      1. for either lrml or ruleml namespace, create an rdf:Resource node to accept a key attribute (which becomes rdf:ID), and containing a mergerOf collection that references the value of keyref as well as transforms the original element, without the key attribute.

      Show
      A draft XSLT (triplifyMerger.xsl) will be committed. The results of the XSLT when applied to the validated LegalRuleML instantances in examples/test_triples (normalized serialization) will also be committed, in examples/triplesCollection, and validated as RDF/XML . The triplifyMerger XSLT copies the triplyCollection XSLT and adds some templates, with higher priority, to implement the exceptional handling of Nodes that have both a keyref attribute and modifying properties, as attributes, child elements, text content or all of these. The implementation uses the user-defined function feature of XSLT 2.0 (xsl:function) to create a function that checks if an XML node is a Node that requires merging of a key-referenced element plus the modifying attributes and/or content. In particular, the function returns true if all of the following are true: 1. local name must start with capital letter 2. the node must have a keyref attribute 3. the node must have at least one child element, text node or attribute that is not keyref This function is used to implement the following template: 1. for either lrml or ruleml namespace, create an rdf:Resource node to accept a key attribute (which becomes rdf:ID), and containing a mergerOf collection that references the value of keyref as well as transforms the original element, without the key attribute.
    • Resolution:
      Hide

      The XSLTs that convert from LegalRuleML XML to RDF have been fully implemented.

      Show
      The XSLTs that convert from LegalRuleML XML to RDF have been fully implemented.

      Description

      This stylesheet generates valid RDF/XML if the input meets the preconditions.
      There is no loss or ambiguity of information except:
      1. Attributes other than @index on edge elements with child or text content will be ignored. This is the desired behavior- ideally, the normalization transformation will not generate such attributes.

      Input Preconditions
      1. All CURIES have been processed into absolute IRIs
      (e.g. using xslt as in https://apache.googlesource.com/stanbol/+/9b61625545e2ba6b903ea0752dcd20656bada822/enhancer/engines/xmpextractor/src/main/resources/xslt/rdfa.xslt)
      2. The document is in the normalized form (e.g. after applying an XSLT normalizer.) including:
      a. Collections may not be empty unless they have a keyref attribute.

        Attachments

          Activity

            People

            • Assignee:
              taraathan Tara Athan (Inactive)
              Reporter:
              taraathan Tara Athan (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: