/usr/share/sgml/OpenJade/contrib/transform.dsl is in openjade 1.4devel1-21.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | <!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
<!-- Copyright (C) 1999 Avi Kivity -->
<!--
This stylesheet provides procedures for handling sgml transformations
using OpenJade's sgml backend. All procedures assume that osnl refers
to a node of class element.
(empty-element? osnl)
Returns #f if the element has a declared content model of EMPTY.
(element-attributes osnl)
Returns a list of the non-implied attributes of osnl, in the same
foramt accepted by the attributes: characteristic of the element
flow object.
(copy-element osnl)
Returns a sosofo that is the identity transformation of osnl. Bug:
Defaulted attributes are made explicit. Fix with prlgabs1?
-->
<style-specification id=transform>
(declare-flow-object-class element
"UNREGISTERED::James Clark//Flow Object Class::element")
(declare-flow-object-class empty-element
"UNREGISTERED::James Clark//Flow Object Class::empty-element")
(declare-flow-object-class document-type
"UNREGISTERED::James Clark//Flow Object Class::document-type")
(declare-flow-object-class entity
"UNREGISTERED::James Clark//Flow Object Class::entity")
(declare-flow-object-class entity-ref
"UNREGISTERED::James Clark//Flow Object Class::entity-ref")
(declare-flow-object-class formatting-instruction
"UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")
(declare-characteristic preserve-sdata?
"UNREGISTERED::James Clark//Characteristic::preserve-sdata?" #f)
(define (empty-element? #!optional (nd (current-node)))
(node-property 'must-omit-end-tag? nd)
)
(define (element-attributes #!optional (nd (current-node)))
(let loop ((atts (named-node-list-names (attributes nd))))
(if (null? atts)
'()
(let*
(
(name (car atts))
(value (attribute-string name nd))
)
(if value
(cons (list name value) (loop (cdr atts)))
(loop (cdr atts))
)
)
)
)
)
(define (copy-element #!optional (node (current-node)))
(if (empty-element? node)
(make empty-element attributes: (element-attributes node))
(make element attributes: (element-attributes node))
)
)
(mode identity-transform
(default (copy-element))
)
|