[interchange-docs] xmldocs - docelic modified bin/refs-autogen

docs at icdevgroup.org docs at icdevgroup.org
Sun Nov 11 19:44:56 EST 2007


User:      docelic
Date:      2007-11-12 00:44:56 GMT
Modified:  bin      refs-autogen
Log:
* For easier writing of docs, create version of the entity that
  has all dashes (no underscores)..

  so you can always write something like &tag-convert-date;, not having to
  worry if it is convert-date or convert_date.

  Still, even with this, the original name will work, and the displayed
  name will still be the one that is correct (exactly how it is
  defined in tag/filter/whatever source).

  (So the "all-dashes" version will only be a help in writing - the
  displayed data will still be correct as you'd expect).

  Btw, this works on all autogenerated entities, not just for tags.

	Closes; #132 (Tag entities)

Revision  Changes    Path
1.122     +16 -0     xmldocs/bin/refs-autogen


rev 1.122, prev_rev 1.121
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- refs-autogen	12 Nov 2007 00:30:44 -0000	1.121
+++ refs-autogen	12 Nov 2007 00:44:56 -0000	1.122
@@ -970,6 +970,22 @@
 			print ATD <<ENDD;
 <!ENTITY ${prefix}-$_ "<$tag>$_</$tag>">
 ENDD
+
+			# For easier writing of docs, create version of the entity that
+			# has all dashes (no underscores).. so you can always write
+			# something like &tag-convert-date;, not having to worry if it is
+			# convert-date or convert_date. Still, even with this, the original
+			# name will work, and the displayed name will be the one that
+			# is correct. (So the "all-dashes" version will only be a help
+			# in writing - the displayed data will still be correct as
+			# you'd expect).
+			my $dashname = $_;
+			$dashname =~ s/_/-/g;
+			unless ($dashname eq $_ ) {
+			print ATD <<ENDD;
+<!ENTITY ${prefix}-$dashname "<$tag>$_</$tag>">
+ENDD
+			}
 		}
 	}
 








More information about the docs mailing list