docs-common/packaging doctype,NONE,1.1 doctype.xsl,1.1,1.2
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Thu Jan 12 02:11:37 UTC 2006
- Previous message (by thread): install-guide fedora-install-guide-adminoptions-en.xml, 1.4, 1.5 fedora-install-guide-en.xml, 1.36, 1.37
- Next message (by thread): release-notes OverView-it.xml, 1.1, 1.2 PackageChanges-it.xml, 1.1, 1.2 ProjectOverview-it.xml, 1.1, 1.2 README-it.xml, 1.3, 1.4 RELEASE-NOTES-it.xml, 1.7, 1.8 Samba-it.xml, 1.1, 1.2 Security-it.xml, 1.1, 1.2 SecuritySELinux-it.xml, 1.2, 1.3 ServerTools-it.xml, 1.1, 1.2 SystemDaemons-it.xml, 1.1, 1.2 WebServers-it.xml, 1.1, 1.2 Welcome-it.xml, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jtr
Update of /cvs/docs/docs-common/packaging
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26796
Modified Files:
doctype.xsl
Added Files:
doctype
Log Message:
Solving the chicken-and-egg problem of creating the
"fdp-info-${LANG}.xml" file by using a simple shell script to pick
out the document type. This is needed because, without the
"fdp-info-${LANG}.xml" file, a new document will not validate and the
xsltproc script "doctype.xsl" cannot determine the document type. To
avoid nasty in-place sed(1)'ing to circumvent the problem, I'll opt
for a non-XML solution.
--- NEW FILE doctype ---
#!/bin/sh
########################################################################
# Script to print the document type, without needing the XML document
# to validate. Get the document type from the first argument to the
# <!DOCTYPE> element, which should be either "book" or "article".
#
# Use it like this:
# doctype file.xml
#
# If you know the XML file WILL VALIDATE, you may use the "doctype.xsl"
# script instead. If not, use this one
########################################################################
egrep '^[[:space:]]*<!DOCTYPE' $* |
awk '{print $2 "info"}'
Index: doctype.xsl
===================================================================
RCS file: /cvs/docs/docs-common/packaging/doctype.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- doctype.xsl 25 Dec 2005 19:26:10 -0000 1.1
+++ doctype.xsl 12 Jan 2006 02:11:30 -0000 1.2
@@ -1,5 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This stylesheet will output the word "articleinfo" or
+ "bookinfo" by finding either the <article> or <book> XML
+ element in the document. Use it like this:
+
+ xsltproc doctype.xsl file.xml
+
+ The "file.xml" file MUST VALIDATE in order for the results
+ to be meaningful. If the document might not validate, use the
+ "doctype" shell script instead.
+ -->
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="/article">articleinfo</xsl:template>
- Previous message (by thread): install-guide fedora-install-guide-adminoptions-en.xml, 1.4, 1.5 fedora-install-guide-en.xml, 1.36, 1.37
- Next message (by thread): release-notes OverView-it.xml, 1.1, 1.2 PackageChanges-it.xml, 1.1, 1.2 ProjectOverview-it.xml, 1.1, 1.2 README-it.xml, 1.3, 1.4 RELEASE-NOTES-it.xml, 1.7, 1.8 Samba-it.xml, 1.1, 1.2 Security-it.xml, 1.1, 1.2 SecuritySELinux-it.xml, 1.2, 1.3 ServerTools-it.xml, 1.1, 1.2 SystemDaemons-it.xml, 1.1, 1.2 WebServers-it.xml, 1.1, 1.2 Welcome-it.xml, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-docs-commits
mailing list