Implement dynamic generation of &base; entity for XML documents and
activate it instead of using a static &base;. Since an .xml database file (or an .xslt stylesheet file) is used from various directories, the static &base; no longer works. PR: www/102331
This commit is contained in:
parent
d7db3cd7ad
commit
9cc1640385
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=28508
17 changed files with 78 additions and 29 deletions
|
@ -1,7 +1,9 @@
|
|||
# doc.xml.mk
|
||||
# $FreeBSD: www/share/mk/doc.xml.mk,v 1.6 2006/08/19 21:18:53 hrs Exp $
|
||||
# $FreeBSD: www/share/mk/doc.xml.mk,v 1.7 2006/08/20 06:31:51 hrs Exp $
|
||||
|
||||
XML_CATALOG_FILES= file://${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog.xml \
|
||||
XML_CATALOG_FILES= file://${.OBJDIR}/catalog-cwd.xml \
|
||||
file://${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog.xml \
|
||||
file://${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog.xml \
|
||||
file://${DOC_PREFIX}/share/sgml/catalog.xml \
|
||||
file://${DOC_PREFIX}/share/sgml/catalog-common.xml \
|
||||
file://${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/catalog.xml \
|
||||
|
@ -29,6 +31,16 @@ XML_INCLUDES+= ${F}
|
|||
.endif
|
||||
.endfor
|
||||
|
||||
XML_INCLUDES+= ${.OBJDIR}/autogen.ent ${.OBJDIR}/catalog-cwd.xml
|
||||
CLEANFILES+= ${.OBJDIR}/autogen.ent ${.OBJDIR}/catalog-cwd.xml
|
||||
|
||||
${.OBJDIR}/autogen.ent:
|
||||
${ECHO_CMD} '<!ENTITY base "${WEB_PREFIX_REL}">' > ${.TARGET}
|
||||
${.OBJDIR}/catalog-cwd.xml: ${WEB_PREFIX}/share/sgml/catalog-cwd.xml
|
||||
${INSTALL} ${.ALLSRC} ${.TARGET}
|
||||
|
||||
DEPENDSET.DEFAULT+= wwwstd
|
||||
|
||||
# DEPENDSET: transtable ......................................................
|
||||
_DEPENDSET.transtable= ${XML_TRANSTABLE} ${XSL_TRANSTABLE} \
|
||||
${XSL_TRANSTABLE_MASTER} ${XSL_TRANSTABLE_COMMON}
|
||||
|
|
16
share/sgml/catalog-cwd.xml
Normal file
16
share/sgml/catalog-cwd.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
|
||||
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
|
||||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||
<rewriteSystem systemIdStartString="http://www.FreeBSD.org/XML/cwd/"
|
||||
rewritePrefix="./"/>
|
||||
<rewriteURI uriStartString="http://www.FreeBSD.org/XML/cwd/"
|
||||
rewritePrefix="./"/>
|
||||
|
||||
<public
|
||||
publicId="-//FreeBSD//DTD FreeBSD Automatically Generated Entities//EN"
|
||||
uri="autogen.ent" />
|
||||
</catalog>
|
|
@ -1,16 +1,17 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/common.ent,v 1.1 2006/08/19 21:20:53 hrs Exp $ -->
|
||||
|
||||
<!-- FreeBSD Common Entities -->
|
||||
<!-- PUBLIC "-//FreeBSD//ENTITIES FreeBSD Common Entities//EN" -->
|
||||
|
||||
<!ENTITY base ".">
|
||||
|
||||
<!ENTITY % url.enbase.eq.base "IGNORE">
|
||||
<![ %url.enbase.eq.base; [
|
||||
<!ENTITY enbase "&base;">
|
||||
]]>
|
||||
<!ENTITY enbase "&base;/..">
|
||||
|
||||
<!-- default value of &base; -->
|
||||
<!ENTITY base ".">
|
||||
|
||||
<!-- default langcode and encoding -->
|
||||
<!ENTITY url.doc.langcode 'en_US.ISO8859-1'>
|
||||
<!ENTITY xml.encoding 'iso-8859-1'>
|
||||
|
@ -34,9 +35,7 @@
|
|||
use &enbase; instead of &base;.
|
||||
-->
|
||||
|
||||
<!ENTITY base ".">
|
||||
<!ENTITY cgibase "http://www.FreeBSD.org/cgi">
|
||||
<!ENTITY enbase ".">
|
||||
<!ENTITY ftpbase "http://security.FreeBSD.org/advisories/">
|
||||
<!ENTITY ftpbaseold "ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/old/">
|
||||
<!ENTITY ftpbaseerrata "ftp://ftp.FreeBSD.org/pub/FreeBSD/ERRATA/notices/">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
$FreeBSD$
|
||||
$FreeBSD: www/share/sgml/events.dtd,v 1.1 2006/08/19 21:20:53 hrs Exp $
|
||||
-->
|
||||
|
||||
<!-- DTD for events.xml on the FreeBSD website. -->
|
||||
|
@ -85,6 +85,11 @@
|
|||
<!ELEMENT cvs:keyword (#PCDATA)>
|
||||
<!ATTLIST cvs:keyword name CDATA #REQUIRED>
|
||||
|
||||
<!ENTITY % autogen.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Automatically Generated Entities//EN"
|
||||
"http://www.FreeBSD.org/XML/cwd/autogen.ent">
|
||||
%autogen.ent;
|
||||
|
||||
<!ENTITY % iso8879.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES ISO 8879:1986 Entity Set//EN//XML"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/iso8879.ent">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- DTD for commercial gallery entries on the FreeBSD website. -->
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/gallery.dtd,v 1.1 2006/08/19 21:20:53 hrs Exp $ -->
|
||||
|
||||
<!ENTITY % xml.features "INCLUDE">
|
||||
<!ENTITY % sgml.features "IGNORE">
|
||||
|
@ -51,6 +51,11 @@
|
|||
<!ELEMENT cvs:keyword (#PCDATA)>
|
||||
<!ATTLIST cvs:keyword name CDATA #REQUIRED>
|
||||
|
||||
<!ENTITY % autogen.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Automatically Generated Entities//EN"
|
||||
"http://www.FreeBSD.org/XML/cwd/autogen.ent">
|
||||
%autogen.ent;
|
||||
|
||||
<!ENTITY % iso8879.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES ISO 8879:1986 Entity Set//EN//XML"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/iso8879.ent">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/news.dtd,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<!ENTITY % xml.features "INCLUDE">
|
||||
<!ENTITY % sgml.features "IGNORE">
|
||||
|
@ -58,6 +58,11 @@
|
|||
id ID #IMPLIED
|
||||
>
|
||||
|
||||
<!ENTITY % autogen.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Automatically Generated Entities//EN"
|
||||
"http://www.FreeBSD.org/XML/cwd/autogen.ent">
|
||||
%autogen.ent;
|
||||
|
||||
<!ENTITY % iso8879.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES ISO 8879:1986 Entity Set//EN//XML"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/iso8879.ent">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/press.dtd,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<!ENTITY % xml.features "INCLUDE">
|
||||
<!ENTITY % sgml.features "IGNORE">
|
||||
|
@ -68,6 +68,11 @@
|
|||
href CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ENTITY % autogen.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Automatically Generated Entities//EN"
|
||||
"http://www.FreeBSD.org/XML/cwd/autogen.ent">
|
||||
%autogen.ent;
|
||||
|
||||
<!ENTITY % iso8879.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES ISO 8879:1986 Entity Set//EN//XML"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/iso8879.ent">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/statusreport.dtd,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<!ENTITY % xml.features "INCLUDE">
|
||||
<!ENTITY % sgml.features "IGNORE">
|
||||
|
@ -127,6 +127,11 @@
|
|||
id ID #IMPLIED
|
||||
>
|
||||
|
||||
<!ENTITY % autogen.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Automatically Generated Entities//EN"
|
||||
"http://www.FreeBSD.org/XML/cwd/autogen.ent">
|
||||
%autogen.ent;
|
||||
|
||||
<!ENTITY % iso8879.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES ISO 8879:1986 Entity Set//EN//XML"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/iso8879.ent">
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "..">
|
||||
<!ENTITY title "Commercial Vendors">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY % navinclude.support "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.entries.xsl,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD Fragment//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "..">
|
||||
<!ENTITY title "FreeBSD Events">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY % navinclude.about "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.events.xsl,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<!-- Copyright (c) 2003 Simon L. Nielsen <simon@FreeBSD.org>
|
||||
All rights reserved.
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "..">
|
||||
<!ENTITY title "FreeBSD News Flash RDF">
|
||||
<!ENTITY email "freebsd-www">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.news-rdf.xsl,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "..">
|
||||
<!ENTITY title "FreeBSD News Flash">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY % navinclude.about "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.newsflash.xsl,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "../..">
|
||||
<!ENTITY title "FreeBSD News Flash">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY % navinclude.about "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.oldnewsflash.xsl,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "../..">
|
||||
<!ENTITY title "FreeBSD in the Press">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY % navinclude.about "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.oldpress.xsl,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "..">
|
||||
<!ENTITY title "FreeBSD in the Press">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY % navinclude.about "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.press.xsl,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD Fragment//EN"
|
||||
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
|
||||
<!ENTITY base "../..">
|
||||
<!ENTITY title "User Groups">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY % navinclude.community "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.usergroups.xsl,v 1.7 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
||||
xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/share/sgml/xslt10-freebsd.dtd,v 1.1 2006/08/19 21:20:54 hrs Exp $ -->
|
||||
|
||||
<!-- Standard XSLT 1.0 DTD for FreeBSD www tree -->
|
||||
<!-- PUBLIC -//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN" -->
|
||||
|
@ -19,6 +19,11 @@
|
|||
%developers.ent;
|
||||
-->
|
||||
|
||||
<!ENTITY % autogen.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES FreeBSD Automatically Generated Entities//EN"
|
||||
"http://www.FreeBSD.org/XML/cwd/autogen.ent">
|
||||
%autogen.ent;
|
||||
|
||||
<!ENTITY % l10n.ent
|
||||
PUBLIC "-//FreeBSD//ENTITIES FreeBSD L10N Entities//EN"
|
||||
"http://www.FreeBSD.org/XML/www/lang/share/sgml/l10n.ent">
|
||||
|
|
Loading…
Reference in a new issue