GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - keeleleek/basex-daffodil: Use DFDL with Daffodil in XQuery on BaseX

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
daffodil.xqm
daffodil.xqm
 
 

Repository files navigation

BaseX-Daffodil

A simple wrapper for using DFDL with the Daffodil CLI from XQuery on BaseX.

The capabilities of the module functions should be obvious when consulting Daffodil's command help (daffodil --help)

This is work in progress and all comments are welcome.

Usage examples

Basically it is meant to be used with partial instantiation

import module namespace daffodil = "edu.illinois.ncsa.daffodil"
  at "basex-daffodil/daffodil.xqm";

let $daffodil-bin := "daffodil-2.0.0/bin/daffodil"

let $my-parser := daffodil:daffodil-cmd-use-schema(
    $daffodil-bin, ?, "parse", ?, "-", "utf-8"
  )
  
(: use "-" instead of an $outfile name to read in the parsed document :)

let $xml := $my-parser("dfdl-schema-file.xsd", "input-file")


(: use a filename to simply let daffodil save it's output on disk :)
let $my-parse-to-file := daffodil:daffodil-cmd-use-schema(
    $daffodil-bin, "dfdl-schema-file.xsd", "parse", ?, "utf-8"
)

for $file-name in $some-dir-listing
  return
    $my-parse-to-file($file-name || ".xml")

It is possible to compile and save a DFDL schema with

daffodil:save-parser($daffodil, $schema, $outfile as xs:string?)

(:~
  if no $outfile is specified, a default value of 
    $schema || ".bin"
  will be used
:)

and use it with

daffodil:daffodil-cmd-use-saved-parser(
    $daffodil-bin, $parser, $action, 
    $infile, $outfile, $sys-encoding as xs:string?
  )

About

Use DFDL with Daffodil in XQuery on BaseX

Topics

basexbasex-databasedaffodildfdl-schema

Resources

Readme
GPL-3.0 license
Activity
Custom properties

Stars

1 star

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.