[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0beta1-8-gd81ed3840

git at osgeo.org git at osgeo.org
Sat Jul 15 09:43:44 PDT 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  d81ed384088daf42186c035b09d63128d67171f3 (commit)
      from  9908e9098acc89184f1ba728114387301f36550c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d81ed384088daf42186c035b09d63128d67171f3
Author: Sandro Santilli <strk at kbt.io>
Date:   Sat Jul 15 18:30:20 2023 +0200

    Drop xmllint requirement for extracting tags
    
    References #5446
    
    Fail if tag nodes cannot be extracted from xsl-config

diff --git a/doc/Makefile.in b/doc/Makefile.in
index 36649dd30..241559351 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -300,13 +300,13 @@ $(XSL_GENERATED_SOURCES): %.xsl.xml: xsl/%.xml.xsl postgis-nospecial.xml xsl-con
 	$(XSLTPROC) --novalid $(XSLTPROC_PATH_OPT) -o $@ $< postgis-nospecial.xml
 endif
 
-ifeq ($(XMLLINT),)
-$(TAG_GENERATED_SOURCES): requirements_not_met_xmllint
+ifeq ($(XSLTPROC),)
+$(TAG_GENERATED_SOURCES): requirements_not_met_xsltproc
 else
-$(TAG_GENERATED_SOURCES): xsl-config.xml Makefile
+$(TAG_GENERATED_SOURCES): xsl/node_by_xpath.xsl xsl-config.xml Makefile
 	tag=tag_$(basename $(notdir $@)); \
-	$(XMLLINT) --xpath "/config/tags/para[@role='$$tag']/node()" $< > $@.tmp && \
-	mv $@.tmp $@
+	$(XSLTPROC) --stringparam xpath "/config/tags/para[@role='$$tag']" -o $@ $< xsl-config.xml
+	test -s $@ # ensure something was extracted
 endif
 
 $(GENERATED_COMMENT_FILES): %.sql: xsl/%.sql.xsl $(XML_INPUTS) postgis-out.xml
diff --git a/doc/xsl/node_by_xpath.xsl b/doc/xsl/node_by_xpath.xsl
new file mode 100644
index 000000000..f26fc37d1
--- /dev/null
+++ b/doc/xsl/node_by_xpath.xsl
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<!--
+Example usage:
+	xsltproc \
+		-stringparam pattern "/config/tags/para[@role='tag_P_support']"
+		-stringparam value '.' xsl/extract_xpath.xsl
+		xsl-config.xml
+-->
+
+<xsl:stylesheet
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+	xmlns:dyn="http://exslt.org/dynamic" extension-element-prefixes="dyn"
+>
+  <xsl:output method="xml" omit-xml-declaration="yes" indent="no" />
+
+  <xsl:template match="/">
+    <xsl:for-each select="dyn:evaluate($xpath)">
+      <xsl:copy-of select="." />
+    </xsl:for-each>
+  </xsl:template>
+</xsl:stylesheet>
+

-----------------------------------------------------------------------

Summary of changes:
 doc/Makefile.in           | 10 +++++-----
 doc/xsl/node_by_xpath.xsl | 23 +++++++++++++++++++++++
 2 files changed, 28 insertions(+), 5 deletions(-)
 create mode 100644 doc/xsl/node_by_xpath.xsl


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list