#!/bin/sh # Architectural Form: test ArcNamrA: # Deriving attribute values from content; data from element "v" goes # to attribute "text" of "verse", and delete it as element content # makes onsgmls segfault; nsgmls.jc accepts this input: # ONSGMLS=nsgmls.jc OSGMLNORM=sgmlnorm.jc ./af-10 # 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-10.sgml af-10.dtd af-meta-10.dtd" cat <af-10.sgml verse 1 verse 2 EOF cat <af-10.dtd EOF cat <af-meta-10.dtd EOF tmpfiles="$tmpfiles af-10-onsgmls.out" : ${ONSGMLS=onsgmls} ${ONSGMLS} >af-10-onsgmls.out -A open af-10.sgml tmpfiles="$tmpfiles af-10-onsgmls.ok" cat <af-10-onsgmls.ok (OPEN (STANZA AN CDATA 1 ATEXT CDATA verse 1 (VERSE )VERSE AN CDATA 2 ATEXT CDATA verse 2 (VERSE )VERSE )STANZA )OPEN C EOF : ${DIFF=diff} ${DIFF} af-10-onsgmls.ok af-10-onsgmls.out result=$? test $result = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles af-10-norm.out" : ${OSGMLNORM=osgmlnorm} ${OSGMLNORM} >af-10-norm.out -A open af-10.sgml tmpfiles="$tmpfiles af-10-norm.ok" cat <af-10-norm.ok EOF ${DIFF} af-10-norm.ok af-10-norm.out result=$? test $result = 0 || result=$(($result + 1)) rm -fr $tmpfiles exit $result