Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 6975 Web Semantics Normalizers for RuleML 1.0 in XSLT 2.0 Nada Alsalmi ‍ Leah Bidlake ‍ Ao Cheng ‍ Thea Gegenberg ‍ Emily Wilson Instructor: Dr. Harold.

Similar presentations


Presentation on theme: "CS 6975 Web Semantics Normalizers for RuleML 1.0 in XSLT 2.0 Nada Alsalmi ‍ Leah Bidlake ‍ Ao Cheng ‍ Thea Gegenberg ‍ Emily Wilson Instructor: Dr. Harold."— Presentation transcript:

1 CS 6975 Web Semantics Normalizers for RuleML 1.0 in XSLT 2.0 Nada Alsalmi ‍ Leah Bidlake ‍ Ao Cheng ‍ Thea Gegenberg ‍ Emily Wilson Instructor: Dr. Harold Boley Advisor: Dr. Tara Athan

2 Overview Introduction Comparison to previous Normalizer Our 4-Phase Normalizer: ▫Phase 1 – Adding Role Tags ▫Phase 2 – Canonical Ordering ▫Phase 3 – Making attribute default values explicit ▫Phase 4 – Pretty Print Demo

3 Introduction Work Flow diagram:

4 Multiple Phases within a Single Stylesheet Within a single stylesheet, a pipeline is expressed as a series of variables:

5 Comparison to Derek’s & David’s Normalizer Performed transformation in 1 Pass/Phase … …

6 PHASE 1

7 RuleML 0.91 to 1.0 All references for namespace and schema locations changed to: http://www.ruleml.org/1.0/xsd http://www.ruleml.org/1.0/xsd Output from style sheet has RuleML Version 1.0 as default namespace.

8 RuleML 0.91 to 1.0 Changes to names of role tags: Children of ▫Role tag replaced with ▫Role tag replace with Children of ▫Role tag replaced with ▫Role tag replace with Name of interpretation attribute: ▫@in changed to @per

9 RuleML 0.91 to 1.0 – Other Changes Webizing attribute: ▫@uri changed to @iri Name of type tag for unified term: ▫ changed to Name of type tag for constant term: ▫ changed to Content of ▫Role tag wraps all content of

10 Phase 1 – Add Missing Edge Stripes Edge is also referred to as role tag or method tag. Match the elements using the parent tag. Determine if the children were already wrapped with the appropriate tag. Wrap the ‘naked’ children with the appropriate role tag. For some elements an index attribute was also added.

11 Phase 1 Each time an element was matched there was a test to determine if the role tags were already present for any or all of the children. In some cases the children may already be wrapped in role tags but in a different order, which had to be tested for. Test cases developed including: relaxed, partially normalized and fully normalized.

12 Phase 1 Adding missing stripes to Implies and Entails – difficult because of the number of possibilities of missing, stripes. As suggested by Tara Athan, our advisor, this was simplified by assuming that the and are in canonical position already if stripes are skipped.

13 Phase 1 – Example 1 st child wrapped with 2 nd child wrapped with Check for partially normalized: ▫If the 1 st child was already wrapped with then the 2 nd child has to be wrapped with

14 Phase 1: Example

15 Test CaseResults Relaxed:Normalized:

16 Test CaseResults Partially Normalized:Normalized:

17 Test CaseResults Partially Normalized:Normalized:

18 Test CaseResults Fully Normalized:Normalized:

19 PHASE 2 Canonical Ordering

20 Phases 2: Canonical Order Output Schema used to infer canonical ordering e.g.

21 Phase 2: Example

22 Phase 2: Example (cont.)

23 Phase 2: Example

24 Phase 2: Example (cont.) Before normalization: After normalization:

25 PHASE 3 Default Values  Treatment of attributes with default values  Remain the original instinct of input

26 Modes Phase 1, Phase2, Phase3 are independently implemented. Use the feature of “mode” from XSLT 2.0  Format the same Data differently in different Places  XSLT Element

27 Default Values @mapMaterial ( yes | no ) @material ( yes | no ) @mapDirection( bidirectional | forward | backward ) @direction( bidirectional | forward | backward ) @oriented ( no | yes ) @val ( 0.. | 1 ) @per ( no | yes ) List

28 Problems Then oxygen seemed to automatically put in all possible attributes listed with their default values. If list all the schemas in the ruleml file, i.e. http://www.ruleml.org/1.0/xsdhttp://www.w3.org/2001/XMLSchema-instancehttp://www.ruleml.org/1.0/xsd http://www.ruleml.org/1.0/xsd/datalog.xsd Oxygen explicit copying of default attributes won’t happen if you do delete the attributes of the RuleML tag that specify the schema.

29 Results Ruleml File After normalized:

30 PHASE 4 Pretty Print

31 Pretty Print Output RuleML nicely Comments For some tags we don’t want a new line

32 Pretty Print – How? Variables and params ▫

33 Pretty Print – Outline

34 Final Demo http://www.w3.org/2005/08/online_xslt/ Normalizer: http://v37s3b4h7dn47s37hg1br4h7rs7n3du7s8n u.unbf.ca/~lbidlak1/100relaxed-to-normal.xslt http://v37s3b4h7dn47s37hg1br4h7rs7n3du7s8n u.unbf.ca/~lbidlak1/100relaxed-to-normal.xslt Handout Website: http://v37s3b4h7dn47s37hg1br4h7rs7n3du7s8n u.unbf.ca/~lbidlak1/ http://v37s3b4h7dn47s37hg1br4h7rs7n3du7s8n u.unbf.ca/~lbidlak1/


Download ppt "CS 6975 Web Semantics Normalizers for RuleML 1.0 in XSLT 2.0 Nada Alsalmi ‍ Leah Bidlake ‍ Ao Cheng ‍ Thea Gegenberg ‍ Emily Wilson Instructor: Dr. Harold."

Similar presentations


Ads by Google