diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-13 15:05:44 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-13 15:05:44 +0000 |
commit | 1bb68d936de2657c3bce3bbe64947f043b5f7333 (patch) | |
tree | 1c2feca2edc4a64e23e6e1c13bfb16962af865af /indra/llxuixml | |
parent | 2aab1d33e125502913075d38d126936d7c2a4a2e (diff) | |
parent | 9fee359d1baf6e0046655cb8e4afabb8774754b1 (diff) |
viewer2 trunk merge.
Diffstat (limited to 'indra/llxuixml')
-rw-r--r-- | indra/llxuixml/llxuiparser.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp index 17399865e5..dbc20a5a1e 100644 --- a/indra/llxuixml/llxuiparser.cpp +++ b/indra/llxuixml/llxuiparser.cpp @@ -324,33 +324,33 @@ void LLXUIXSDWriter::writeXSD(const std::string& type_name, const std::string& p // add includes for all possible children const std::type_info* type = *LLWidgetTypeRegistry::instance().getValue(type_name); const widget_registry_t* widget_registryp = LLChildRegistryRegistry::instance().getValue(type); - - // add include declarations for all valid children - for (widget_registry_t::Registrar::registry_map_t::const_iterator it = widget_registryp->currentRegistrar().beginItems(); - it != widget_registryp->currentRegistrar().endItems(); - ++it) - { - std::string widget_name = it->first; - if (widget_name == type_name) - { - continue; - } - LLXMLNodePtr nodep = new LLXMLNode("xs:include", false); - nodep->createChild("schemaLocation", true)->setStringValue(widget_name + ".xsd"); - - // add to front of schema - mSchemaNode->addChild(nodep, mSchemaNode); - } // add choices for valid children if (widget_registryp) { + // add include declarations for all valid children + for (widget_registry_t::Registrar::registry_map_t::const_iterator it = widget_registryp->currentRegistrar().beginItems(); + it != widget_registryp->currentRegistrar().endItems(); + ++it) + { + std::string widget_name = it->first; + if (widget_name == type_name) + { + continue; + } + LLXMLNodePtr nodep = new LLXMLNode("xs:include", false); + nodep->createChild("schemaLocation", true)->setStringValue(widget_name + ".xsd"); + + // add to front of schema + mSchemaNode->addChild(nodep, mSchemaNode); + } + for (widget_registry_t::Registrar::registry_map_t::const_iterator it = widget_registryp->currentRegistrar().beginItems(); it != widget_registryp->currentRegistrar().endItems(); ++it) { std::string widget_name = it->first; - //<xs:element name="widget_name" type="widget_name"> + //<xs:element name="widget_name" type="widget_name"> LLXMLNodePtr widget_node = mElementNode->createChild("xs:element", false); widget_node->createChild("name", true)->setStringValue(widget_name); widget_node->createChild("type", true)->setStringValue(widget_name); |