Hosted by
|
#!/usr/bin/php -qC <?php
// $Date: 2004/01/20 06:21:45 $ // $Revision: 1.2 $ // $Author: jcrocholl $
require('ado-read.php');
$adsfilename = "$filestem-musicxml.ads"; $adbfilename = "$filestem-musicxml.adb";
$ads = $adb = '-- $'.'Date$ -- $'.'Revision$ -- $'.'Author$
';
$ads .= "with XML_Readers; use XML_Readers; with XML_Writers; use XML_Writers;
package $package.MusicXML is
-- Read $object_lower data from an XML reader. function Read_$object (XML : in XML_Reader) -- Use this XML reader. return $object_access; -- The newly created $object_lower.
-- Write $object_lower data to an XML writer. procedure Write_$object (XML : in XML_Writer; -- Use this XML writer. This : access $object); -- Write this $object_lower.
end $package.MusicXML; ";
$adb .= $body_with . "package body $package.MusicXML is
-- Read $object_lower data from an XML reader. function Read_$object (XML : in XML_Reader) -- Use this XML reader. return $object_access -- The newly created $object_lower. is Result : $object_access := Create; begin return Result; end Read_$object;
-- Write $object_lower data to an XML writer. procedure Write_$object (XML : in XML_Writer; -- Use this XML writer. This : access $object) -- Write this $object_lower. is begin Start_Element(XML, \"$object_hyphen\");
Close_Element(XML, \"$object_hyphen\"); end Write_$object;
end $package.MusicXML; ";
if (file_exists($adsfilename)) { print "skipped existing $adsfilename\n"; } else { if (!$adsfilehandle = fopen($adsfilename, 'w')) die("could not open $adsfilename with write access\n"); if (!fwrite($adsfilehandle, $ads)) die("could not write $adsfilename\n"); fclose($adsfilehandle); print "wrote $adsfilename\n"; }
if (file_exists($adbfilename)) { print "skipped existing $adbfilename\n"; } else { if (!$adbfilehandle = fopen($adbfilename, 'w')) die("could not open $adbfilename with write access\n"); if (!fwrite($adbfilehandle, $adb)) die("could not write $adbfilename\n"); fclose($adbfilehandle); print "wrote $adbfilename\n"; }
?>
|