~ubuntu-branches/ubuntu/vivid/augeas/vivid-proposed

« back to all changes in this revision

Viewing changes to lenses/xml.aug

  • Committer: Package Import Robot
  • Author(s): Raphaël Pinson
  • Date: 2014-12-01 10:49:19 UTC
  • mfrom: (1.6.1) (24.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20141201104919-lalkacyk0i5fndg5
Tags: 1.3.0-0ubuntu1
* New upstream version
* Include d/p/0003_Link_pthread.patch again

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
                      store /[^> \t\n\r]|[^> \t\n\r][^>\t\n\r]*[^> \t\n\r]/ ]
54
54
 
55
55
let decl_def (r:regexp) (b:lens) = [ dels "<" . key r .
56
 
                                     sep_spc . store word .
 
56
                                     sep_spc . store nmtoken .
57
57
                                     b . sep_osp . del_end_simple ]
58
58
 
59
59
let elem_def      = decl_def /!ELEMENT/ decl
105
105
let attributes    =
106
106
  let attval1 = attval "'" "'" /[^']*"[^']*/ in (* " *)
107
107
  let attval2 = attval "\"" "\"" /[^"]*'[^"]*/ in
108
 
  let attval3 = attval /['"]/ "\"" /[^'\"]*/ in (* " *)
 
108
  let attval3 = attval /['"]/ "\"" /(\\\\|[^'\"])*/ in (* " *)
109
109
  [ label "#attribute" . (attval1|attval2|attval3)+ ]
110
110
 
111
111
let prolog        = [ label "#declaration" .
147
147
let rec content2 = element (content1|text|comment)
148
148
*)
149
149
 
150
 
let rec content = element (text|comment|content|empty_element|pi_instruction)
 
150
let rec content = element (text|comment|content|empty_element|pi_instruction|cdata)
151
151
 
152
152
(* Constraints are weaker here, but it's better than being too strict *)
153
153
let doc = (sep_osp . (prolog  | comment | doctype | pi_instruction))* .
158
158
 
159
159
let filter = (incl "/etc/xml/*.xml")
160
160
    . (incl "/etc/xml/catalog")
161
 
    . Util.stdexcl
162
161
 
163
162
let xfm = transform lns filter