#!/bin/sh # Architectural Form: test ArcNamrA: # Deriving content from attribute values; derive value of attribute "n" # as content. Additionally, data from element "v" goes # to attribute "text" of "verse". # This makes onsgmls segfault; nsgmls.jc accepts this input: # ONSGMLS=nsgmls.jc OSGMLNORM=sgmlnorm.jc ./af-11 # test onsgmls and osgmlnorm LANG=C; export LANG LC_ALL=C; export LC_ALL tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles af-11.sgml af-11.dtd af-meta-11.dtd" cat <af-11.sgml verse 1 verse 2 EOF cat <af-11.dtd EOF cat <af-meta-11.dtd EOF tmpfiles="$tmpfiles af-11-onsgmls.out" : ${ONSGMLS=onsgmls} ${ONSGMLS} >af-11-onsgmls.out -A open af-11.sgml tmpfiles="$tmpfiles af-11-onsgmls.ok" cat <af-11-onsgmls.ok (OPEN (STANZA ATEXT CDATA verse 1 (VERSE -1 )VERSE ATEXT CDATA verse 2 (VERSE -2 )VERSE )STANZA )OPEN C EOF : ${DIFF=diff} ${DIFF} af-11-onsgmls.ok af-11-onsgmls.out result=$? test $result = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles af-11-norm.out" : ${OSGMLNORM=osgmlnorm} ${OSGMLNORM} >af-11-norm.out -A open af-11.sgml tmpfiles="$tmpfiles af-11-norm.ok" cat <af-11-norm.ok 1 2 EOF ${DIFF} af-11-norm.ok af-11-norm.out result=$? test $result = 0 || result=$(($result + 1)) rm -fr $tmpfiles exit $result