| 266 | */ |
| 267 | |
| 268 | const xmlChar * |
| 269 | xmlSplitQName3(const xmlChar *name, int *len) { |
| 270 | int l = 0; |
| 271 | |
| 272 | if (name == NULL) return(NULL); |
| 273 | if (len == NULL) return(NULL); |
| 274 | |
| 275 | /* nasty but valid */ |
| 276 | if (name[0] == ':') |
| 277 | return(NULL); |
| 278 | |
| 279 | /* |
| 280 | * we are not trying to validate but just to cut, and yes it will |
| 281 | * work even if this is as set of UTF-8 encoded chars |
| 282 | */ |
| 283 | while ((name[l] != 0) && (name[l] != ':')) |
| 284 | l++; |
| 285 | |
| 286 | if ((name[l] == 0) || (name[l+1] == 0)) |
| 287 | return(NULL); |
| 288 | |
| 289 | *len = l; |
| 290 | |
| 291 | return(&name[l+1]); |
| 292 | } |
| 293 | |
| 294 | /** |
| 295 | * xmlSplitQName4: |
no outgoing calls
no test coverage detected