61 } |
61 } |
62 |
62 |
63 public: |
63 public: |
64 |
64 |
65 static const string_t OPTION_NAMESPACE; |
65 static const string_t OPTION_NAMESPACE; |
|
66 static const string_t OPTION_PARSER_OPTION; |
66 static const string_t OPTION_RELATION; |
67 static const string_t OPTION_RELATION; |
67 static const string_t OPTION_NAME_IS_XPATH; |
68 static const string_t OPTION_NAME_IS_XPATH; |
68 static const string_t OPTION_RECORDS; |
69 static const string_t OPTION_RECORDS; |
69 static const string_t OPTION_ATTRIBUTE; |
70 static const string_t OPTION_ATTRIBUTE; |
70 static const string_t OPTION_XINCLUDE; |
71 static const string_t OPTION_XINCLUDE; |
80 string_t option = readNext(arguments, i); |
81 string_t option = readNext(arguments, i); |
81 |
82 |
82 if (option == OPTION_NAMESPACE) { |
83 if (option == OPTION_NAMESPACE) { |
83 c.namespaceMappings.push_back(readNext(arguments, i)); |
84 c.namespaceMappings.push_back(readNext(arguments, i)); |
84 c.namespaceMappings.push_back(readNext(arguments, i)); |
85 c.namespaceMappings.push_back(readNext(arguments, i)); |
|
86 } else if (option == OPTION_PARSER_OPTION) { |
|
87 c.parserOptions.push_back({readNext(arguments, i), readNext(arguments, i)}); |
85 } else if (option == OPTION_XINCLUDE) { |
88 } else if (option == OPTION_XINCLUDE) { |
86 c.xinclude = parseBoolean(readNext(arguments, i)); |
89 c.xinclude = parseBoolean(readNext(arguments, i)); |
87 } else if (option == OPTION_RELATION) { |
90 } else if (option == OPTION_RELATION) { |
88 addRelation(c, currentRelation); // previous relation |
91 addRelation(c, currentRelation); // previous relation |
89 currentRelation.relation = readNext(arguments, i); |
92 currentRelation.relation = readNext(arguments, i); |
129 virtual ~CLIParser() { |
132 virtual ~CLIParser() { |
130 } |
133 } |
131 }; |
134 }; |
132 |
135 |
133 const string_t CLIParser::OPTION_NAMESPACE = L"--namespace"; |
136 const string_t CLIParser::OPTION_NAMESPACE = L"--namespace"; |
|
137 const string_t CLIParser::OPTION_PARSER_OPTION = L"--parser-option"; |
134 const string_t CLIParser::OPTION_RELATION = L"--relation"; |
138 const string_t CLIParser::OPTION_RELATION = L"--relation"; |
135 const string_t CLIParser::OPTION_NAME_IS_XPATH = L"--name-is-xpath"; |
139 const string_t CLIParser::OPTION_NAME_IS_XPATH = L"--name-is-xpath"; |
136 const string_t CLIParser::OPTION_RECORDS = L"--records"; |
140 const string_t CLIParser::OPTION_RECORDS = L"--records"; |
137 const string_t CLIParser::OPTION_ATTRIBUTE = L"--attribute"; |
141 const string_t CLIParser::OPTION_ATTRIBUTE = L"--attribute"; |
138 const string_t CLIParser::OPTION_XINCLUDE = L"--xinclude"; |
142 const string_t CLIParser::OPTION_XINCLUDE = L"--xinclude"; |