Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

jfdm/idris-xml

Repository files navigation

Idris XML

A Simple XML library for Idris. It is a work in construction, so things will fail.

  • This library has been inspired by =xml-conduit=.
  • This library is not necessarily feature complete and will have missing functionality.
    • Name spaces are local only and prefix’s are not parsed.
    • The XML declaration is not intelligent and checks for root element name is not performed.
    • Empty content in XML tags is parsed.
  • The DOM model is simple.
  • Things I would like to have but not necessarily the time for include:
    • Tests!
    • Possibe add a node operator class
    • Add Eq instance, may need to add shapes
    • QuasiQuotes idiomatic construction of documents within Idris.
      • Something more consice than the dom model.
    • Full implementation of XPath, or Cursor, or XQuery
    • XSD validation.
    • Better Soundness guarantees
      • using dependenty types
      • wrt xmlnode
    • XSLT transformation processing.
  • There are most likely things I would like to include but don’t knwo that I need to include. If you know about this please consider contributing.

XPath Implementation

The XPath implementation is not complete. This is due in part to:

  1. I do not know how to implement the feature;
  2. I do not need the feature so have not implemented the feature;
  3. I couldn’t care less about the feature;
  4. I do not think it should be a feature.

Contexts

Current Context
author
Document Root
/bookstore
Recursive Descent
//author
Specific Elements
bookstore/book

Operators

Child /
selects immediate children of the left-side collection. When this path operator appears at the start of the pattern, it indicates that children should be selected from the root node.
Recursive descent //
searches for the specified element at any depth. When this path operator appears at the start of the pattern, it indicates recursive descent from the root node.
Wildcard *
Not yet implemented.
Attributes @
Not yet implemented

Collections

Operations on collections are not going to be supported.

Filters and Filter Patterns

Filters on collections are not going to be supported.

Boolean, Comparison, and Set Expressions

Boolean, comparison, set expressions are not going to be supported.

Location Paths

  • Abbreviated location paths are supported only.

Location Steps

  • Absolute and relative steps are supported.

Axes

Axes are partially supported. There will only be support for:

  • Child
  • Self
  • Attribute

Node Tests

  • Name Tests are supported.
    • namespaces are not supported.
  • Node Type Tests are supported
    • only for comment, node and text.
    • only specified at the end of absolute paths.
  • Targeted Processing Instructions are not supported.

Predicates

Are not supported.