mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
propogating recent edits through
This commit is contained in:
parent
a958b03544
commit
4030057c74
5 changed files with 7 additions and 6 deletions
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
#include <SAX/ArabicaConfig.hpp>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
|
@ -205,7 +204,7 @@ class NamespaceSupport
|
|||
*
|
||||
* <p>Note that attribute names are processed differently than
|
||||
* element names: an unprefixed element name will received the
|
||||
* default Namespace (if any), while an unprefixed element name
|
||||
* default Namespace (if any), while an unprefixed attribute name
|
||||
* will not.</p>
|
||||
*
|
||||
* @param qName The raw XML 1.0 name to be processed.
|
||||
|
@ -218,6 +217,8 @@ class NamespaceSupport
|
|||
*/
|
||||
Parts processName(const string_type& qName, bool isAttribute) const
|
||||
{
|
||||
|
||||
|
||||
Parts name;
|
||||
typename string_adaptor::size_type index = string_adaptor::find(qName, nsc_.colon);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
std::pair<std::string, std::string> processInternalQName(const std::string& qName) const
|
||||
{
|
||||
if(!Arabica::XML::is_qname(qName))
|
||||
if(!Arabica::XML::is_qname<Arabica::default_string_adaptor<std::string> >(qName))
|
||||
throw SAX::SAXException("Bad name : " + qName);
|
||||
// 2.4 The default namespace is not used for unprefixed names.
|
||||
if(qName.find(':') == std::string::npos)
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
virtual void execute(const DOM::Node<std::string>& node, ExecutionContext& context) const
|
||||
{
|
||||
std::string name = name_->evaluateAsString(node, context.xpathContext());
|
||||
if(!Arabica::XML::is_qname(name))
|
||||
if(!Arabica::XML::is_qname<Arabica::default_string_adaptor<std::string> >(name))
|
||||
throw SAX::SAXException("xsl:element name attribute must evaluate to a valid element name");
|
||||
|
||||
std::string namesp;
|
||||
|
|
|
@ -36,7 +36,7 @@ private:
|
|||
if(name.empty())
|
||||
throw SAX::SAXException("xsl:processing-instruction : name attribute must evaluate to a valid name");
|
||||
|
||||
if(!Arabica::XML::is_ncname(name))
|
||||
if(!Arabica::XML::is_ncname<Arabica::default_string_adaptor<std::string> >(name))
|
||||
throw SAX::SAXException("xsl:processing-instruction : '" + name + "' is not valid as the name");
|
||||
|
||||
if(name.length() != 3)
|
||||
|
|
|
@ -16,7 +16,7 @@ struct QName
|
|||
|
||||
static QName createQName(const std::string& qName)
|
||||
{
|
||||
if(!Arabica::XML::is_qname(qName))
|
||||
if(!Arabica::XML::is_qname<Arabica::default_string_adaptor<std::string> >(qName))
|
||||
throw SAX::SAXException("Bad name : " + qName);
|
||||
|
||||
static char COLON = Arabica::text::Unicode<char>::COLON;
|
||||
|
|
Loading…
Reference in a new issue