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 | 71f5efbf0af820c427dcace0050537d6442a011a (patch) | |
tree | 006946ccd3db7dc65d3a93fefc5c139445d9b7bb /app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch | |
parent | Stable on amd64 (diff) | |
download | historical-71f5efbf0af820c427dcace0050537d6442a011a.tar.gz historical-71f5efbf0af820c427dcace0050537d6442a011a.tar.bz2 historical-71f5efbf0af820c427dcace0050537d6442a011a.zip |
Update patch to fix whitespace handling in xpath regexps, bug #188114.
Package-Manager: portage-2.1.3.9
Diffstat (limited to 'app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch')
-rw-r--r-- | app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch | 32 |
1 files changed, 26 insertions, 6 deletions
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*))*" } } } |