Project

Profile

Help

Revision 3468f5cc

Added by Michael Kay about 12 years ago

Fix bug 2859187 XHTML meta element added in wrong namespace

View differences:

latest9.1/bj/net/sf/saxon/event/MetaTagAdjuster.java
22 22
    int droppingMetaTags = -1;
23 23
    boolean inMetaTag = false;
24 24
    boolean foundHead = false;
25
    String headPrefix = null;
25 26
    int metaCode;
26 27
    short requiredURICode = 0;
27 28
    AttributeCollectionImpl attributes;
......
105 106
            String localName = namePool.getLocalName(nameCode);
106 107
            if (uriCode == requiredURICode && comparesEqual(localName, "head")) {
107 108
                foundHead = true;
109
                headPrefix = namePool.getPrefix(nameCode);
108 110
            }
109 111
        }
110 112

  
......
144 146
            foundHead = false;
145 147
            NamePool namePool = getNamePool();
146 148
            nextReceiver.startContent();
147
            int metaCode = namePool.allocate("", requiredURICode, "meta");
149
            int metaCode = namePool.allocate(headPrefix, requiredURICode, "meta");
148 150
            nextReceiver.startElement(metaCode, StandardNames.XS_UNTYPED, 0, 0);
149 151
            int httpEquivCode = namePool.allocate("", "", "http-equiv");
150 152
            nextReceiver.attribute(httpEquivCode, StandardNames.XS_UNTYPED_ATOMIC, "Content-Type", 0, 0);

Also available in: Unified diff