diff options
author | Ulrich Müller <ulm@gentoo.org> | 2007-09-12 15:04:56 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2007-09-12 15:04:56 +0000 |
commit | dd7f273c673d9434d052db8271240ba52c890312 (patch) | |
tree | eaad6d6b63339a8cd26738e0b501b414da9c9117 /app-emacs/nxml-mode | |
parent | Stable on amd64 (diff) | |
download | gentoo-2-dd7f273c673d9434d052db8271240ba52c890312.tar.gz gentoo-2-dd7f273c673d9434d052db8271240ba52c890312.tar.bz2 gentoo-2-dd7f273c673d9434d052db8271240ba52c890312.zip |
Update patch to fix whitespace handling in xpath regexps, bug #188114.
(Portage version: 2.1.3.9)
Diffstat (limited to 'app-emacs/nxml-mode')
-rw-r--r-- | app-emacs/nxml-mode/ChangeLog | 6 | ||||
-rw-r--r-- | app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch | 32 |
2 files changed, 31 insertions, 7 deletions
diff --git a/app-emacs/nxml-mode/ChangeLog b/app-emacs/nxml-mode/ChangeLog index 5257f41a8fc8..4c416a65cc0d 100644 --- a/app-emacs/nxml-mode/ChangeLog +++ b/app-emacs/nxml-mode/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-emacs/nxml-mode # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emacs/nxml-mode/ChangeLog,v 1.25 2007/09/09 10:00:18 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emacs/nxml-mode/ChangeLog,v 1.26 2007/09/12 15:04:56 ulm Exp $ + + 12 Sep 2007; Ulrich Mueller <ulm@gentoo.org> + files/nxml-mode-xmlschema-xpath.patch: + Update patch to fix whitespace handling in xpath regexps, bug #188114. *nxml-mode-20041004-r2 (09 Sep 2007) diff --git a/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch b/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch index b1a00240bc47..97d81a7950f0 100644 --- a/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch +++ b/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch @@ -1,13 +1,33 @@ ---- nxml-mode-20041004-orig/schema/xmlschema.rnc 2007-09-09 11:50:06.000000000 +0200 -+++ nxml-mode-20041004/schema/xmlschema.rnc 2007-09-09 11:50:19.000000000 +0200 +Avoid size limit for xpath regular expressions by using two patterns. +See https://bugs.gentoo.org/show_bug.cgi?id=188114 for discussion +and references. +The following bash script will recreate the long patterns: + +S="\\s*" +NCName='[^./|:*@\s]+' +QName="${NCName}:${NCName}" +NameTest="(child::${S})?(${NCName}:)?(${NCName}|\\*)" +Step="${S}(\\.|${NameTest})${S}" +Path="(${S}\\.${S}//)?${Step}(/${Step})*" +Selector="${Path}(\\|${Path})*" +echo "selector: ${Selector}" +LastStep="${Step}|${S}(@|attribute::)${S}${NameTest}${S}" +Path="(${S}\\.${S}//)?(${Step}/)*(${LastStep})" +Selector="${Path}(\\|${Path})*" +echo "field: ${Selector}" + +2007-09-12 Martin von Gagern <Martin.vGagern@gmx.net> + +--- nxml-mode-20041004.orig/schema/xmlschema.rnc 2007-08-10 01:56:18.000000000 +0200 ++++ nxml-mode-20041004/schema/xmlschema.rnc 2007-09-12 11:31:26.000000000 +0200 @@ -809,8 +809,9 @@ annotated, attribute xpath { xsd:token { -+ pattern = "[./|:*@]*([^\I:][^\C:]*[./|:*@]+)*([^\I:][^\C:]*)?" ++ pattern = "[./|:*@\s]*([^\I:][^\C:]*[./|:*@\s]+)*([^\I:][^\C:]*)?" pattern = - "(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*" -+ "(\s*\.\s*//)?\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*(/\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*)*(\|(\s*\.\s*//)?\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*(/\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*)*)*" ++ "(\s*\.\s*//)?\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*(/\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*)*(\|(\s*\.\s*//)?\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*(/\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*)*)*" } } } @@ -15,10 +35,10 @@ annotated, attribute xpath { xsd:token { -+ pattern = "[./|:*@]*([^\I:][^\C:]*[./|:*@]+)*([^\I:][^\C:]*)?" ++ pattern = "[./|:*@\s]*([^\I:][^\C:]*[./|:*@\s]+)*([^\I:][^\C:]*)?" pattern = - "(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*" -+ "(\s*\.\s*//)?(\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*/)*(\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*|\s*(@|attribute::)\s*(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*)\s*)(\|(\s*\.\s*//)?(\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*/)*(\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*|\s*(@|attribute::)\s*(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*)\s*))*" ++ "(\s*\.\s*//)?(\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*/)*(\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*|\s*(@|attribute::)\s*(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*)\s*)(\|(\s*\.\s*//)?(\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*/)*(\s*(\.|(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*))\s*|\s*(@|attribute::)\s*(child::\s*)?([^./|:*@\s]+:)?([^./|:*@\s]+|\*)\s*))*" } } } |