~spyzer-abhishek0/+junk/gsoc2011

« back to all changes in this revision

Viewing changes to src/xml/repr-io.cpp

  • Committer: Abhishek Sharma
  • Date: 2011-08-07 18:56:20 UTC
  • Revision ID: sharma.abhishek.it@gmail.com-20110807185620-1y7o9gp466yuqy55
Modifying approach to check attributes. Inserting more checks. Reading files from inkscape_datadir standard install directories. Fixed some bugs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
951
951
    {
952
952
        Glib::ustring attribute = g_quark_to_string(iter->key);
953
953
        
954
 
        if (SPAttributeRelSVG::findIfValid(attribute, repr->name())
955
 
           || element.substr(0,4) != "svg:"
956
 
           || attribute.substr(0,5) != "xmlns:") {
 
954
        if (SPAttributeRelSVG::findIfValid(attribute, repr->name()) 
 
955
            || element.substr(0,4) != "svg:") {
957
956
            if (!inlineattrs) {
958
957
                out.writeString("\n");
959
958
                if (indent) {
967
966
            out.printf(" %s=\"", g_quark_to_string(iter->key));
968
967
            repr_quote_write(out, iter->value);
969
968
            out.writeChar('"');
 
969
        } else {
 
970
            g_warning( "Invalid attribute: %s stripped from <%s>",
 
971
                    attribute.c_str(),
 
972
                    element.c_str() );
970
973
        }
971
974
    }
972
975