docs-common/common/entities Makefile, 1.2, 1.3 entities-en.xml, 1.2, 1.3 entities-it.ent, 1.1, 1.2 entities-it.xml, 1.1, 1.2 entities.dtd, 1.2, 1.3 entities.xsl, 1.1, 1.2 it.po, 1.1, 1.2

Tommy Reynolds (jtr) fedora-docs-commits at redhat.com
Sat Feb 25 03:45:42 UTC 2006


Author: jtr

Update of /cvs/docs/docs-common/common/entities
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13418

Modified Files:
	Makefile entities-en.xml entities-it.ent entities-it.xml 
	entities.dtd entities.xsl it.po 
Log Message:
Implement the <use/> entity because you can't embed  an entity
reference such as "&FED;" in an XML document that doesn't have it
defined using an "<!ENTITY>" element.



Index: Makefile
===================================================================
RCS file: /cvs/docs/docs-common/common/entities/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile	25 Feb 2006 01:47:35 -0000	1.2
+++ Makefile	25 Feb 2006 03:45:34 -0000	1.3
@@ -2,6 +2,11 @@
 
 all:	entities-it.ent
 
+clean:
+
+distclean clobber: clean
+	${RM} *.ent
+
 entities-it.ent: entities-it.xml entities.xsl
 	xsltproc -o $@ entities.xsl entities-it.xml
 


Index: entities-en.xml
===================================================================
RCS file: /cvs/docs/docs-common/common/entities/entities-en.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- entities-en.xml	25 Feb 2006 01:32:18 -0000	1.2
+++ entities-en.xml	25 Feb 2006 03:45:34 -0000	1.3
@@ -3,6 +3,26 @@
 <!DOCTYPE entities SYSTEM "entities.dtd">
 
 <entities>
+  <title>
+    These common entities are useful shorthand terms and names,
+    which may be subject to change at anytime.  This is an important
+    value the the entity provides: a single location to update terms
+    and common names.
+  </title>
+  <group name="Fedora common entries">
+    <entity name="FED">
+      <comment>Generic root term</comment>
+      <text>Fedora</text>
+    </entity>
+    <entity name="CORE">
+      <comment>Generic root term</comment>
+      <text>Core</text>
+    </entity>
+    <entity name="FC">
+      <comment>Generic main project name</comment>
+      <text><use entity="FED"/> <use entity="CORE"/></text>
+    </entity>
+  </group>
   <entity name="FDPX">
     <comment>Short docs project name</comment>
     <text>Fedora Docs Project</text>


Index: entities-it.ent
===================================================================
RCS file: /cvs/docs/docs-common/common/entities/entities-it.ent,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- entities-it.ent	25 Feb 2006 01:26:56 -0000	1.1
+++ entities-it.ent	25 Feb 2006 03:45:34 -0000	1.2
@@ -1,4 +1,11 @@
 
-  <!-- Italian short docs project name -->
-<!ENTITY  FDPX "Projecto Fedora Document">
+  <!-- These common entities are useful shorthand terms and names, which may be subject to change at anytime. This is an important value the the entity provides: a single location to update terms and common names. -->
+
+  <!-- Group: Fedora common entries -->
+
+    <!ENTITY FED "Fedora" >  <!-- Generic root term-->
+    <!ENTITY CORE "Core" >  <!-- Generic root term-->
+    <!ENTITY FC "&FED; &CORE;" >  <!-- Generic main project name-->
+  
+  <!ENTITY FDPX "Projecto Fedora Document" >  <!-- Italian short docs project name-->
 


Index: entities-it.xml
===================================================================
RCS file: /cvs/docs/docs-common/common/entities/entities-it.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- entities-it.xml	25 Feb 2006 01:26:56 -0000	1.1
+++ entities-it.xml	25 Feb 2006 03:45:34 -0000	1.2
@@ -1,8 +1,23 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE entities SYSTEM "entities.dtd">
 <entities>
+  <title>These common entities are useful shorthand terms and names, which may be subject to change at anytime. This is an important value the the entity provides: a single location to update terms and common names.</title>
+  <group name="Fedora common entries">
+    <entity name="FED">
+      <comment>Generic root term</comment>
+      <text>Fedora</text>
+    </entity>
+    <entity name="CORE">
+      <comment>Generic root term</comment>
+      <text>Core</text>
+    </entity>
+    <entity name="FC">
+      <comment>Generic main project name</comment>
+      <text><use entity="FED"/> <use entity="CORE"/></text>
+    </entity>
+  </group>
   <entity name="FDPX">
-    <desc>Italian short docs project name</desc>
+    <comment>Italian short docs project name</comment>
     <text>Projecto Fedora Document</text>
   </entity>
 </entities>


Index: entities.dtd
===================================================================
RCS file: /cvs/docs/docs-common/common/entities/entities.dtd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- entities.dtd	25 Feb 2006 01:32:18 -0000	1.2
+++ entities.dtd	25 Feb 2006 03:45:34 -0000	1.3
@@ -1,7 +1,15 @@
-<!ELEMENT entities              (entity*)                              >
+<!ELEMENT entities              (title,(entity|group)*)                >
+
+<!ELEMENT title                 (#PCDATA)                              >
 
 <!ELEMENT entity                (comment,text)                         >
 <!ATTLIST entity        name    NMTOKEN         #REQUIRED              >
 
 <!ELEMENT comment               (#PCDATA)                              >
-<!ELEMENT text                  (#PCDATA)                              >
\ No newline at end of file
+<!ELEMENT text                  (#PCDATA|use)*                         >
+
+<!ELEMENT group                 (entity*)                              >
+<!ATTLIST group         name    CDATA           #REQUIRED              >
+
+<!ELEMENT use                   EMPTY                                  >
+<!ATTLIST use           entity  NMTOKEN         #REQUIRED              >
\ No newline at end of file


Index: entities.xsl
===================================================================
RCS file: /cvs/docs/docs-common/common/entities/entities.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- entities.xsl	25 Feb 2006 01:26:56 -0000	1.1
+++ entities.xsl	25 Feb 2006 03:45:34 -0000	1.2
@@ -1,21 +1,44 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <xsl:output omit-xml-declaration="yes"/>
+  <xsl:output indent="yes" omit-xml-declaration="yes"/>
 
-  <xsl:template match="/entities">
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="entities">
     <xsl:apply-templates/>
   </xsl:template>
 
   <xsl:template match="entity">
+    <xsl:variable name="name" select="name"/>
+    <xsl:variable name="desc" select="comment"/>
+    <xsl:variable name="body">
+      <xsl:apply-templates/>
+    </xsl:variable>
+    <xsl:value-of select="concat( '<!ENTITY ', @name, ' "', normalize-space($body), '" >  <!-- ', normalize-space($desc), '-->')" disable-output-escaping="yes"/>
+  </xsl:template>
+
+  <xsl:template match="use">
+    <xsl:variable name="content" select="@entity"/>
+    <xsl:value-of select="normalize-space(concat( '&', $content, ';'))" disable-output-escaping="yes"/>
+  </xsl:template>
+
+  <xsl:template match="group">
+    <xsl:comment>
+      <xsl:value-of select="concat( ' Group: ', @name, ' ')"/>
+    </xsl:comment>
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="comment"/>
+
+  <xsl:template match="title">
     <xsl:comment>
       <xsl:text> </xsl:text>
-      <xsl:value-of select="desc"/>
+      <xsl:copy-of select="."/>
       <xsl:text> </xsl:text>
     </xsl:comment>
-    <xsl:text disable-output-escaping="yes"><!ENTITY</xsl:text>
-    <xsl:text> </xsl:text>
-    <xsl:value-of select="concat(' ', @name,' "',text,'"')"/>
-    <xsl:text disable-output-escaping="yes">></xsl:text>
   </xsl:template>
 </xsl:stylesheet>


Index: it.po
===================================================================
RCS file: /cvs/docs/docs-common/common/entities/it.po,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- it.po	25 Feb 2006 01:26:56 -0000	1.1
+++ it.po	25 Feb 2006 03:45:34 -0000	1.2
@@ -3,7 +3,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: it\n"
-"POT-Creation-Date: 2006-02-23 02:09-0600\n"
+"POT-Creation-Date: 2006-02-24 21:35-0600\n"
 "PO-Revision-Date: 2006-02-23 03:14-0600\n"
 "Last-Translator: Tommy Reynolds <Tommy.Reynolds at MegaCoder.com>\n"
 "Language-Team: US English <en at li.org>\n"
@@ -12,16 +12,39 @@
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: KBabel 1.11.1\n"
 
-#: entities.xml:7(desc)
+#: entities-en.xml:6(title)
+msgid ""
+"These common entities are useful shorthand terms and names, which may be "
+"subject to change at anytime. This is an important value the the entity "
+"provides: a single location to update terms and common names."
+msgstr ""
+
+#: entities-en.xml:14(comment) entities-en.xml:18(comment)
+msgid "Generic root term"
+msgstr ""
+
+#: entities-en.xml:15(text)
+msgid "Fedora"
+msgstr ""
+
+#: entities-en.xml:19(text)
+msgid "Core"
+msgstr ""
+
+#: entities-en.xml:22(comment)
+#, fuzzy
+msgid "Generic main project name"
+msgstr "Italian short docs project name"
+
+#: entities-en.xml:27(comment)
 msgid "Short docs project name"
 msgstr "Italian short docs project name"
 
-#: entities.xml:8(text)
+#: entities-en.xml:28(text)
 msgid "Fedora Docs Project"
 msgstr "Projecto Fedora Document"
 
 #. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2.
-#: entities.xml:0(None)
+#: entities-en.xml:0(None)
 msgid "translator-credits"
 msgstr "Tommy Reynolds <Tommy.Reynolds at MegaCoder.com> 2006"
-




More information about the Fedora-docs-commits mailing list