[octc-svndiff] SF.net SVN: octc:[417] trunk/tools
Brought to you by:
bansp
|
From: <ba...@us...> - 2010-11-27 11:54:36
|
Revision: 417
http://octc.svn.sourceforge.net/octc/?rev=417&view=rev
Author: bansp
Date: 2010-11-27 11:54:30 +0000 (Sat, 27 Nov 2010)
Log Message:
-----------
perform a simplistic text dump, for tools that want plain text
Added Paths:
-----------
trunk/tools/xquery/
trunk/tools/xquery/simple_dump.xquery
Added: trunk/tools/xquery/simple_dump.xquery
===================================================================
--- trunk/tools/xquery/simple_dump.xquery (rev 0)
+++ trunk/tools/xquery/simple_dump.xquery 2010-11-27 11:54:30 UTC (rev 417)
@@ -0,0 +1,25 @@
+(: simple_dump.xquery - perform a really primitive dump of the contents of an OCTC text
+
+Separate paragraph-type elements with a single line, unless it's ab[@type="phr"],
+which is handled here in a very short-sighted way, pending the revision of the
+guidelines for base-level text encoding.
+
+Originally by Piotr Bański (bansp at o2.pl), 26-nov-2010.
+License: GNU GPL ver. 3.0 or any later version.
+
+$Id:$
+:)
+
+declare default element namespace "http://www.tei-c.org/ns/1.0";
+declare namespace functx = "http:///www.functx.com";
+
+declare option saxon:output "method=text";
+
+(:the following variable is system-internal :)
+declare variable $my_svn_id as xs:string := "$Id:$";
+
+for $par in //text//(ab | p)
+
+return concat($par,if ($par[local-name() eq 'ab' and @type eq 'phr']) then '' else ' ')
+(: this is in fact wrong, because it assumes that ab[@type="phr"] is always prefixal;
+there is something wrong with typing ab elements in general, possibly, so I'm leaving this be here :)
\ No newline at end of file
Property changes on: trunk/tools/xquery/simple_dump.xquery
___________________________________________________________________
Added: svn:keywords
+ Author URL Rev Date Id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|