| 551 if(column->type == DAVQL_IDENTIFIER) { |
551 if(column->type == DAVQL_IDENTIFIER) { |
| 552 // TODO: remove code duplication (add_cmd) |
552 // TODO: remove code duplication (add_cmd) |
| 553 davqlresprop_t resprop; |
553 davqlresprop_t resprop; |
| 554 cxstring propertyname = cx_strchr(column->srctext, ':'); |
554 cxstring propertyname = cx_strchr(column->srctext, ':'); |
| 555 if(propertyname.length > 0) { |
555 if(propertyname.length > 0) { |
| 556 char *ns; |
556 const char *ns; |
| 557 char *name; |
557 const char *name; |
| 558 dav_get_property_namespace_str( |
558 dav_get_property_namespace_str( |
| 559 sn->context, |
559 sn->context, |
| 560 cx_strdup_a(mp->allocator, column->srctext).ptr, |
560 cx_strdup_a(mp->allocator, column->srctext).ptr, |
| 561 &ns, |
561 &ns, |
| 562 &name); |
562 &name); |
| 818 case DAVQL_IDENTIFIER: { |
818 case DAVQL_IDENTIFIER: { |
| 819 cxstring propertyname = cx_strchr(src, ':'); |
819 cxstring propertyname = cx_strchr(src, ':'); |
| 820 cmd.type = DAVQL_CMD_RES_IDENTIFIER; |
820 cmd.type = DAVQL_CMD_RES_IDENTIFIER; |
| 821 if(propertyname.length > 0) { |
821 if(propertyname.length > 0) { |
| 822 cmd.type = DAVQL_CMD_PROP_IDENTIFIER; |
822 cmd.type = DAVQL_CMD_PROP_IDENTIFIER; |
| 823 char *ns; |
823 const char *ns; |
| 824 char *name; |
824 const char *name; |
| 825 dav_get_property_namespace_str( |
825 dav_get_property_namespace_str( |
| 826 ctx, |
826 ctx, |
| 827 cx_strdup_a(a, src).ptr, |
827 cx_strdup_a(a, src).ptr, |
| 828 &ns, |
828 &ns, |
| 829 &name); |
829 &name); |
| 830 if(ns && name) { |
830 if(ns && name) { |
| 831 cmd.data.property.ns = ns; |
831 cmd.data.property.ns = (char*)ns; |
| 832 cmd.data.property.name = name; |
832 cmd.data.property.name = (char*)name; |
| 833 } else { |
833 } else { |
| 834 // error |
834 // error |
| 835 return -1; |
835 return -1; |
| 836 } |
836 } |
| 837 } else if(!dav_identifier2resprop(src, &cmd.data.resprop)) { |
837 } else if(!dav_identifier2resprop(src, &cmd.data.resprop)) { |