| | 260 | Index: tango/text/xml/Document.d |
|---|
| | 261 | =================================================================== |
|---|
| | 262 | --- tango/text/xml/Document.d (revision 3939) |
|---|
| | 263 | +++ tango/text/xml/Document.d (working copy) |
|---|
| | 264 | @@ -1243,7 +1243,8 @@ |
|---|
| | 265 | freeIndex = 0; |
|---|
| | 266 | } |
|---|
| | 267 | |
|---|
| | 268 | - NodeSet set = {this}; |
|---|
| | 269 | + NodeSet set; |
|---|
| | 270 | + set.host = this; |
|---|
| | 271 | auto mark = freeIndex; |
|---|
| | 272 | allocate(root); |
|---|
| | 273 | return set.assign (mark); |
|---|
| | 274 | @@ -1273,7 +1274,8 @@ |
|---|
| | 275 | |
|---|
| | 276 | NodeSet dup () |
|---|
| | 277 | { |
|---|
| | 278 | - NodeSet copy = {host}; |
|---|
| | 279 | + NodeSet copy; |
|---|
| | 280 | + copy.host = host; |
|---|
| | 281 | copy.nodes = nodes.dup; |
|---|
| | 282 | return copy; |
|---|
| | 283 | } |
|---|
| | 284 | @@ -1337,7 +1339,7 @@ |
|---|
| | 285 | |
|---|
| | 286 | NodeSet nth (uint index) |
|---|
| | 287 | { |
|---|
| | 288 | - NodeSet set = {host}; |
|---|
| | 289 | + NodeSet set; set.host = host; |
|---|
| | 290 | auto mark = host.mark; |
|---|
| | 291 | if (index < nodes.length) |
|---|
| | 292 | host.allocate (nodes [index]); |
|---|
| | 293 | @@ -1495,7 +1497,7 @@ |
|---|
| | 294 | |
|---|
| | 295 | NodeSet filter (bool delegate(Node) filter) |
|---|
| | 296 | { |
|---|
| | 297 | - NodeSet set = {host}; |
|---|
| | 298 | + NodeSet set; set.host = host; |
|---|
| | 299 | auto mark = host.mark; |
|---|
| | 300 | |
|---|
| | 301 | foreach (node; nodes) |
|---|
| | 302 | @@ -1514,7 +1516,7 @@ |
|---|
| | 303 | NodeSet child (bool delegate(Node) filter, |
|---|
| | 304 | XmlNodeType type = XmlNodeType.Element) |
|---|
| | 305 | { |
|---|
| | 306 | - NodeSet set = {host}; |
|---|
| | 307 | + NodeSet set; set.host = host; |
|---|
| | 308 | auto mark = host.mark; |
|---|
| | 309 | |
|---|
| | 310 | foreach (parent; nodes) |
|---|
| | 311 | @@ -1534,7 +1536,7 @@ |
|---|
| | 312 | |
|---|
| | 313 | NodeSet attribute (bool delegate(Node) filter) |
|---|
| | 314 | { |
|---|
| | 315 | - NodeSet set = {host}; |
|---|
| | 316 | + NodeSet set; set.host = host; |
|---|
| | 317 | auto mark = host.mark; |
|---|
| | 318 | |
|---|
| | 319 | foreach (node; nodes) |
|---|
| | 320 | @@ -1565,7 +1567,7 @@ |
|---|
| | 321 | } |
|---|
| | 322 | } |
|---|
| | 323 | |
|---|
| | 324 | - NodeSet set = {host}; |
|---|
| | 325 | + NodeSet set; set.host = host; |
|---|
| | 326 | auto mark = host.mark; |
|---|
| | 327 | |
|---|
| | 328 | foreach (node; nodes) |
|---|
| | 329 | @@ -1583,7 +1585,7 @@ |
|---|
| | 330 | |
|---|
| | 331 | NodeSet parent (bool delegate(Node) filter) |
|---|
| | 332 | { |
|---|
| | 333 | - NodeSet set = {host}; |
|---|
| | 334 | + NodeSet set; set.host = host; |
|---|
| | 335 | auto mark = host.mark; |
|---|
| | 336 | |
|---|
| | 337 | foreach (node; nodes) |
|---|
| | 338 | @@ -1613,7 +1615,7 @@ |
|---|
| | 339 | |
|---|
| | 340 | NodeSet ancestor (bool delegate(Node) filter) |
|---|
| | 341 | { |
|---|
| | 342 | - NodeSet set = {host}; |
|---|
| | 343 | + NodeSet set; set.host = host; |
|---|
| | 344 | auto mark = host.mark; |
|---|
| | 345 | |
|---|
| | 346 | void traverse (Node child) |
|---|
| | 347 | @@ -1648,7 +1650,7 @@ |
|---|
| | 348 | NodeSet next (bool delegate(Node) filter, |
|---|
| | 349 | XmlNodeType type = XmlNodeType.Element) |
|---|
| | 350 | { |
|---|
| | 351 | - NodeSet set = {host}; |
|---|
| | 352 | + NodeSet set; set.host = host; |
|---|
| | 353 | auto mark = host.mark; |
|---|
| | 354 | |
|---|
| | 355 | foreach (node; nodes) |
|---|
| | 356 | @@ -1675,7 +1677,7 @@ |
|---|
| | 357 | NodeSet prev (bool delegate(Node) filter, |
|---|
| | 358 | XmlNodeType type = XmlNodeType.Element) |
|---|
| | 359 | { |
|---|
| | 360 | - NodeSet set = {host}; |
|---|
| | 361 | + NodeSet set; set.host = host; |
|---|
| | 362 | auto mark = host.mark; |
|---|
| | 363 | |
|---|
| | 364 | foreach (node; nodes) |
|---|