//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2018 Saxonica Limited. // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package net.sf.saxon.serialize; import net.sf.saxon.event.ProxyReceiver; import net.sf.saxon.event.Receiver; import net.sf.saxon.expr.parser.Location; import net.sf.saxon.om.NodeName; import net.sf.saxon.serialize.charcode.UTF16CharacterSet; import net.sf.saxon.serialize.charcode.XMLCharacterData; import net.sf.saxon.trans.XPathException; import net.sf.saxon.type.SchemaType; import net.sf.saxon.type.SimpleType; /** * This class is used on the serialization pipeline to check that the document conforms * to XML 1.0 rules. It is placed on the pipeline only when the configuration permits * XML 1.1 constructs, but the particular output document is being serialized as XML 1.0 * *
Simplified in Saxon 9.6 because the rules for XML Names in 1.0 are now the same as * the rules in 1.1; only the rules for valid characters are different.
*/ public class XML10ContentChecker extends ProxyReceiver { public XML10ContentChecker(Receiver next) { super(next); } /** * Notify the start of an element * @param elemName integer code identifying the name of the element within the name pool. * @param typeCode integer code identifying the element's type within the name pool. * @param location * @param properties properties of the element node */ public void startElement(NodeName elemName, SchemaType typeCode, Location location, int properties) throws XPathException { nextReceiver.startElement(elemName, typeCode, location, properties); } /** * Notify an attribute. Attributes are notified after the startElement event, and before any * children. Namespaces and attributes may be intermingled. * * @param attName The name of the attribute * @param typeCode The type of the attribute * @param locationId the location of the node in the source, or of the instruction that created it * @param properties Bit significant value. The following bits are defined: *