Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emacs/nxml-mode/files: nxml-mode-xmlschema-xpath.patch
Date: Wed, 12 Sep 2007 15:13:37
Message-Id: E1IVTlx-000529-8P@stork.gentoo.org
1 ulm 07/09/12 15:04:57
2
3 Modified: nxml-mode-xmlschema-xpath.patch
4 Log:
5 Update patch to fix whitespace handling in xpath regexps, bug #188114.
6 (Portage version: 2.1.3.9)
7
8 Revision Changes Path
9 1.2 app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch?rev=1.2&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch?rev=1.2&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch?r1=1.1&r2=1.2
14
15 Index: nxml-mode-xmlschema-xpath.patch
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/app-emacs/nxml-mode/files/nxml-mode-xmlschema-xpath.patch,v
18 retrieving revision 1.1
19 retrieving revision 1.2
20 diff -u -r1.1 -r1.2
21 --- nxml-mode-xmlschema-xpath.patch 9 Sep 2007 10:00:19 -0000 1.1
22 +++ nxml-mode-xmlschema-xpath.patch 12 Sep 2007 15:04:56 -0000 1.2
23 @@ -1,13 +1,33 @@
24 ---- nxml-mode-20041004-orig/schema/xmlschema.rnc 2007-09-09 11:50:06.000000000 +0200
25 -+++ nxml-mode-20041004/schema/xmlschema.rnc 2007-09-09 11:50:19.000000000 +0200
26 +Avoid size limit for xpath regular expressions by using two patterns.
27 +See https://bugs.gentoo.org/show_bug.cgi?id=188114 for discussion
28 +and references.
29 +The following bash script will recreate the long patterns:
30 +
31 +S="\\s*"
32 +NCName='[^./|:*@\s]+'
33 +QName="${NCName}:${NCName}"
34 +NameTest="(child::${S})?(${NCName}:)?(${NCName}|\\*)"
35 +Step="${S}(\\.|${NameTest})${S}"
36 +Path="(${S}\\.${S}//)?${Step}(/${Step})*"
37 +Selector="${Path}(\\|${Path})*"
38 +echo "selector: ${Selector}"
39 +LastStep="${Step}|${S}(@|attribute::)${S}${NameTest}${S}"
40 +Path="(${S}\\.${S}//)?(${Step}/)*(${LastStep})"
41 +Selector="${Path}(\\|${Path})*"
42 +echo "field: ${Selector}"
43 +
44 +2007-09-12 Martin von Gagern <Martin.vGagern@×××.net>
45 +
46 +--- nxml-mode-20041004.orig/schema/xmlschema.rnc 2007-08-10 01:56:18.000000000 +0200
47 ++++ nxml-mode-20041004/schema/xmlschema.rnc 2007-09-12 11:31:26.000000000 +0200
48 @@ -809,8 +809,9 @@
49 annotated,
50 attribute xpath {
51 xsd:token {
52 -+ pattern = "[./|:*@]*([^\I:][^\C:]*[./|:*@]+)*([^\I:][^\C:]*)?"
53 ++ pattern = "[./|:*@\s]*([^\I:][^\C:]*[./|:*@\s]+)*([^\I:][^\C:]*)?"
54 pattern =
55 - "(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*"
56 -+ "(\s*\.\s*//)?\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*(/\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*)*(\|(\s*\.\s*//)?\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*(/\s*(\.|(child::\s*)?([^./|:*@]+:)?([^./|:*@]+|\*))\s*)*)*"
57 ++ "(\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*)*)*"
58 }
59 }
60 }
61 @@ -15,10 +35,10 @@
62 annotated,
63 attribute xpath {
64 xsd:token {
65 -+ pattern = "[./|:*@]*([^\I:][^\C:]*[./|:*@]+)*([^\I:][^\C:]*)?"
66 ++ pattern = "[./|:*@\s]*([^\I:][^\C:]*[./|:*@\s]+)*([^\I:][^\C:]*)?"
67 pattern =
68 - "(\.//)?((((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*|\*)))))*"
69 -+ "(\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*))*"
70 ++ "(\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*))*"
71 }
72 }
73 }
74
75
76
77 --
78 gentoo-commits@g.o mailing list