summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-25 03:45:34 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-02-25 03:45:34 +0000
commit0c434ea59ffa766526ed7f8bb2185ed5063bf3f8 (patch)
treee9b91197caf2f4e1879d8532ec84a5f968bc9e2f
parent113a1e60b6db8ae0c4f230fc6105f5221dc727c2 (diff)
downloadfedora-doc-utils-0c434ea59ffa766526ed7f8bb2185ed5063bf3f8.tar.gz
fedora-doc-utils-0c434ea59ffa766526ed7f8bb2185ed5063bf3f8.tar.xz
fedora-doc-utils-0c434ea59ffa766526ed7f8bb2185ed5063bf3f8.zip
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.
-rw-r--r--common/entities/Makefile5
-rw-r--r--common/entities/entities-en.xml20
-rw-r--r--common/entities/entities-it.ent11
-rw-r--r--common/entities/entities-it.xml17
-rw-r--r--common/entities/entities.dtd12
-rw-r--r--common/entities/entities.xsl37
-rw-r--r--common/entities/it.po33
7 files changed, 118 insertions, 17 deletions
diff --git a/common/entities/Makefile b/common/entities/Makefile
index cd76d26..b36a116 100644
--- a/common/entities/Makefile
+++ b/common/entities/Makefile
@@ -2,6 +2,11 @@ PRI_LANG=en
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
diff --git a/common/entities/entities-en.xml b/common/entities/entities-en.xml
index 5a46610..4cbc26c 100644
--- a/common/entities/entities-en.xml
+++ b/common/entities/entities-en.xml
@@ -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>
diff --git a/common/entities/entities-it.ent b/common/entities/entities-it.ent
index 8e29fe7..bac0a96 100644
--- a/common/entities/entities-it.ent
+++ b/common/entities/entities-it.ent
@@ -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-->
diff --git a/common/entities/entities-it.xml b/common/entities/entities-it.xml
index 05bf402..f0cbbdf 100644
--- a/common/entities/entities-it.xml
+++ b/common/entities/entities-it.xml
@@ -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>
diff --git a/common/entities/entities.dtd b/common/entities/entities.dtd
index 51f7432..0e95a06 100644
--- a/common/entities/entities.dtd
+++ b/common/entities/entities.dtd
@@ -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
diff --git a/common/entities/entities.xsl b/common/entities/entities.xsl
index 727d83b..952f9e4 100644
--- a/common/entities/entities.xsl
+++ b/common/entities/entities.xsl
@@ -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( '&lt;!ENTITY ', @name, ' &quot;', normalize-space($body), '&quot; &gt; &lt;!-- ', normalize-space($desc), '--&gt;')" disable-output-escaping="yes"/>
+ </xsl:template>
+
+ <xsl:template match="use">
+ <xsl:variable name="content" select="@entity"/>
+ <xsl:value-of select="normalize-space(concat( '&amp;', $content, &apos;;&apos;))" 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">&lt;!ENTITY</xsl:text>
- <xsl:text> </xsl:text>
- <xsl:value-of select="concat(' ', @name,' &quot;',text,'&quot;')"/>
- <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
</xsl:template>
</xsl:stylesheet>
diff --git a/common/entities/it.po b/common/entities/it.po
index 5464ce4..9e5610f 100644
--- a/common/entities/it.po
+++ b/common/entities/it.po
@@ -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@MegaCoder.com>\n"
"Language-Team: US English <en@li.org>\n"
@@ -12,16 +12,39 @@ msgstr ""
"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@MegaCoder.com> 2006"
-