sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 02/02: PooledMarshaller.marshal(Object, XMLStreamWriter) shall not close the given XMLStreamWriter. PooledUnmarshaller.unmarshal(Object, XMLStreamReader) should not close the given XMLStreamReader. This is for consistency with the behavior of other methods working on input streams, etc., and is necessary for user who want to continue to read/write in the XML stream after (un)marshalling.
Date Wed, 27 Jun 2018 13:57:30 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 9efb527bdc8b47b4eba727e70ca45be9e278beb1
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Wed Jun 27 15:50:27 2018 +0200

    PooledMarshaller.marshal(Object, XMLStreamWriter) shall not close the given XMLStreamWriter.
    PooledUnmarshaller.unmarshal(Object, XMLStreamReader) should not close the given XMLStreamReader.
    This is for consistency with the behavior of other methods working on input streams, etc.,
    and is necessary for user who want to continue to read/write in the XML stream after (un)marshalling.
    
    As a side effect of this work, some classes moved to a new 'org.apache.sis.internal.xml' package.
    This has an impact on import statements of many file, but otherwise no change in the code.
---
 .../java/org/apache/sis/internal/jaxb/Context.java |  1 +
 .../apache/sis/internal/jaxb/cat/CodeListUID.java  |  2 +-
 .../sis/internal/jaxb/code/LegacyCharacterSet.java |  2 +-
 .../sis/internal/jaxb/code/MD_MediumNameCode.java  |  2 +-
 .../sis/internal/jaxb/code/package-info.java       |  2 +-
 .../sis/internal/jaxb/gco/GO_CharacterString.java  |  2 +-
 .../apache/sis/internal/jaxb/gco/GO_DateTime.java  |  2 +-
 .../apache/sis/internal/jaxb/gmi/MI_Metadata.java  |  2 +-
 .../apache/sis/internal/jaxb/gmi/package-info.java |  2 +-
 .../apache/sis/internal/jaxb/gml/DateAdapter.java  |  2 +-
 .../org/apache/sis/internal/jaxb/gml/Measure.java  |  2 +-
 .../apache/sis/internal/jaxb/gml/TM_Primitive.java |  2 +-
 .../apache/sis/internal/jaxb/gml/TimeInstant.java  |  2 +-
 .../apache/sis/internal/jaxb/gml/TimePeriod.java   |  2 +-
 .../internal/jaxb/gml/UniversalTimeAdapter.java    |  6 ++---
 .../sis/internal/jaxb/gts/TM_PeriodDuration.java   |  2 +-
 .../org/apache/sis/internal/jaxb/lan/Country.java  |  2 +-
 .../apache/sis/internal/jaxb/lan/PT_Locale.java    |  2 +-
 .../metadata/replace/ReferenceSystemMetadata.java  |  2 +-
 .../jaxb/metadata/replace/ServiceParameter.java    |  2 +-
 .../jaxb/metadata/replace/package-info.java        |  2 +-
 .../org/apache/sis/internal/jaxb/package-info.java |  1 +
 .../internal/{jaxb => xml}/LegacyNamespaces.java   |  2 +-
 .../apache/sis/internal/{jaxb => xml}/Schemas.java |  2 +-
 .../sis/internal/xml}/StreamWriterDelegate.java    |  4 +--
 .../sis/internal/{jaxb => xml}/XmlUtilities.java   |  3 ++-
 .../sis/internal/{jaxb => xml}/package-info.java   | 18 +++++--------
 .../iso/DefaultExtendedElementInformation.java     |  2 +-
 .../apache/sis/metadata/iso/DefaultMetadata.java   |  2 +-
 .../sis/metadata/iso/citation/DefaultCitation.java |  2 +-
 .../sis/metadata/iso/citation/DefaultContact.java  |  2 +-
 .../iso/citation/DefaultResponsibleParty.java      |  2 +-
 .../metadata/iso/citation/DefaultTelephone.java    |  2 +-
 .../sis/metadata/iso/citation/package-info.java    |  2 +-
 .../iso/content/DefaultCoverageDescription.java    |  2 +-
 .../DefaultFeatureCatalogueDescription.java        |  2 +-
 .../iso/content/DefaultImageDescription.java       |  2 +-
 .../iso/content/DefaultRangeDimension.java         |  2 +-
 .../sis/metadata/iso/content/package-info.java     |  2 +-
 .../metadata/iso/distribution/DefaultDataFile.java |  2 +-
 .../metadata/iso/distribution/DefaultFormat.java   |  2 +-
 .../metadata/iso/distribution/DefaultMedium.java   |  2 +-
 .../metadata/iso/distribution/package-info.java    |  2 +-
 .../iso/identification/AbstractIdentification.java |  2 +-
 .../DefaultAggregateInformation.java               |  2 +-
 .../iso/identification/DefaultCoupledResource.java |  2 +-
 .../identification/DefaultDataIdentification.java  |  2 +-
 .../metadata/iso/identification/package-info.java  |  2 +-
 .../metadata/iso/lineage/DefaultProcessStep.java   |  2 +-
 .../sis/metadata/iso/lineage/DefaultSource.java    |  2 +-
 .../sis/metadata/iso/lineage/package-info.java     |  2 +-
 .../maintenance/DefaultMaintenanceInformation.java |  2 +-
 .../sis/metadata/iso/maintenance/package-info.java |  2 +-
 .../org/apache/sis/metadata/iso/package-info.java  |  2 +-
 .../sis/metadata/iso/quality/AbstractElement.java  |  2 +-
 .../metadata/iso/quality/DefaultDataQuality.java   |  2 +-
 .../iso/quality/DefaultQuantitativeResult.java     |  2 +-
 .../sis/metadata/iso/quality/DefaultUsability.java |  2 +-
 .../sis/metadata/iso/quality/package-info.java     |  2 +-
 .../main/java/org/apache/sis/xml/InputFactory.java | 29 +++++++++++++++-----
 .../main/java/org/apache/sis/xml/Namespaces.java   |  2 +-
 .../java/org/apache/sis/xml/OutputFactory.java     | 31 ++++++++++++++++++----
 .../src/main/java/org/apache/sis/xml/Pooled.java   |  2 +-
 .../java/org/apache/sis/xml/TransformVersion.java  |  2 +-
 .../org/apache/sis/xml/TransformingWriter.java     |  2 +-
 .../internal/jaxb/cat/CodeListMarshallingTest.java |  4 +--
 .../apache/sis/internal/jaxb/gml/MeasureTest.java  |  2 +-
 .../sis/internal/jaxb/gml/TimePeriodTest.java      |  2 +-
 .../internal/jaxb/lan/FreeTextMarshallingTest.java |  2 +-
 .../sis/internal/jaxb/lan/LanguageCodeTest.java    |  4 +--
 .../internal/{jaxb => xml}/XmlUtilitiesTest.java   |  2 +-
 .../sis/metadata/iso/ImmutableIdentifierTest.java  |  2 +-
 .../iso/citation/DefaultResponsibilityTest.java    |  2 +-
 .../constraint/DefaultLegalConstraintsTest.java    |  2 +-
 .../iso/identification/DefaultResolutionTest.java  |  4 +--
 .../metadata/iso/lineage/DefaultLineageTest.java   |  2 +-
 .../java/org/apache/sis/test/MetadataAssert.java   |  2 +-
 .../java/org/apache/sis/test/XMLComparator.java    |  2 +-
 .../test/java/org/apache/sis/test/XMLTestCase.java |  4 +--
 .../org/apache/sis/test/mock/MetadataMock.java     |  2 +-
 .../apache/sis/test/suite/MetadataTestSuite.java   |  2 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java   |  4 +--
 .../org/apache/sis/test/xml/PackageVerifier.java   |  2 +-
 .../apache/sis/util/iso/NameMarshallingTest.java   |  2 +-
 .../sis/xml/CharSequenceSubstitutionTest.java      |  2 +-
 .../org/apache/sis/xml/RenameListGenerator.java    |  2 +-
 .../apache/sis/xml/TransformingNamespacesTest.java |  2 +-
 .../referencing/datum/DefaultVerticalDatum.java    |  2 +-
 .../datum/DefaultPrimeMeridianTest.java            |  2 +-
 .../datum/DefaultVerticalDatumTest.java            |  2 +-
 .../apache/sis/test/integration/MetadataTest.java  |  2 +-
 .../sis/internal/storage/xml/StoreProvider.java    |  2 +-
 .../internal/storage/xml/MimeTypeDetectorTest.java |  2 +-
 .../apache/sis/internal/storage/xml/StoreTest.java |  2 +-
 .../storage/xml/stream/FormattedWriter.java        |  1 +
 .../storage/xml/stream/NamespaceEraser.java        |  1 +
 .../internal/storage/xml/stream/package-info.java  |  2 +-
 97 files changed, 157 insertions(+), 122 deletions(-)

diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java
index 64b2f47..83eeeef 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Context.java
@@ -35,6 +35,7 @@ import org.apache.sis.util.resources.Messages;
 import org.apache.sis.util.resources.IndexedResourceBundle;
 import org.apache.sis.util.CorruptedObjectException;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.system.Semaphores;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.xml.IdentifierSpace;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListUID.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListUID.java
index 43ba54e..05d8053 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListUID.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListUID.java
@@ -26,7 +26,7 @@ import org.opengis.util.CodeList;
 import org.opengis.util.ControlledVocabulary;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.Schemas;
+import org.apache.sis.internal.xml.Schemas;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
index 049a011..7d1c950 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/LegacyCharacterSet.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.identification.CharacterSet;
 import org.apache.sis.internal.jaxb.cat.CodeListAdapter;
 import org.apache.sis.internal.jaxb.cat.CodeListUID;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
index 25283ac..0f372e0 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_MediumNameCode.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlElement;
 import org.opengis.metadata.distribution.MediumName;
 import org.apache.sis.internal.jaxb.cat.CodeListAdapter;
 import org.apache.sis.internal.jaxb.cat.CodeListUID;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
index e2bcb8a..7596367 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/package-info.java
@@ -62,4 +62,4 @@ import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.XmlSchema;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
index 358b898..88759a8 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
@@ -34,7 +34,7 @@ import org.apache.sis.internal.jaxb.gcx.Anchor;
 import org.apache.sis.internal.jaxb.gcx.FileName;
 import org.apache.sis.internal.jaxb.gcx.MimeFileType;
 import org.apache.sis.internal.jaxb.cat.CodeListUID;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Workaround;
 import org.apache.sis.util.iso.Types;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_DateTime.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_DateTime.java
index 03935d7..9e3cbfd 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_DateTime.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_DateTime.java
@@ -25,7 +25,7 @@ import javax.xml.datatype.DatatypeConfigurationException;
 import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.datatype.DatatypeConstants;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.XmlUtilities;
+import org.apache.sis.internal.xml.XmlUtilities;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
index 2ac1edb..446e678 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/MI_Metadata.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.Metadata;
 import org.apache.sis.metadata.iso.DefaultMetadata;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java
index 80bc3ff..482d7fb 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gmi/package-info.java
@@ -50,5 +50,5 @@ import javax.xml.bind.annotation.XmlNsForm;
 import javax.xml.bind.annotation.XmlSchema;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.xml.Namespaces;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
index 79704f7..f5c8107 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
@@ -21,7 +21,7 @@ import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.datatype.DatatypeConfigurationException;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.XmlUtilities;
+import org.apache.sis.internal.xml.XmlUtilities;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
index cb32319..cda7664 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
@@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlValue;
 import javax.xml.bind.annotation.XmlAttribute;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.Schemas;
+import org.apache.sis.internal.xml.Schemas;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.util.DefinitionURI;
 import org.apache.sis.measure.UnitFormat;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
index 98af9b7..9903cd0 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
@@ -21,8 +21,8 @@ import javax.xml.bind.annotation.XmlElement;
 import org.opengis.temporal.Period;
 import org.opengis.temporal.Instant;
 import org.opengis.temporal.TemporalPrimitive;
+import org.apache.sis.internal.xml.XmlUtilities;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.XmlUtilities;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
 import org.apache.sis.internal.util.TemporalUtilities;
 import org.apache.sis.util.resources.Errors;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
index af2a25d..611e527 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
@@ -24,7 +24,7 @@ import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.datatype.DatatypeConfigurationException;
 import org.opengis.temporal.Instant;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.XmlUtilities;
+import org.apache.sis.internal.xml.XmlUtilities;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriod.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriod.java
index 44aab8e..5a66b04 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriod.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriod.java
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.temporal.Period;
 import org.apache.sis.internal.jaxb.Context;
 
-import static org.apache.sis.internal.jaxb.LegacyNamespaces.VERSION_3_0;
+import static org.apache.sis.internal.xml.LegacyNamespaces.VERSION_3_0;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
index 2097ade..4b24109 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
@@ -25,9 +25,7 @@ import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.datatype.DatatypeConfigurationException;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.XmlUtilities;
-
-import static org.apache.sis.internal.jaxb.XmlUtilities.getDatatypeFactory;
+import org.apache.sis.internal.xml.XmlUtilities;
 
 
 /**
@@ -81,7 +79,7 @@ public final class UniversalTimeAdapter extends XmlAdapter<XMLGregorianCalendar,
             final GregorianCalendar calendar = new GregorianCalendar(UTC, Locale.ROOT);
             calendar.setTime(value);
             try {
-                final XMLGregorianCalendar gc = getDatatypeFactory().newXMLGregorianCalendar(calendar);
+                final XMLGregorianCalendar gc = XmlUtilities.getDatatypeFactory().newXMLGregorianCalendar(calendar);
                 if (gc.getMillisecond() == 0) {
                     gc.setMillisecond(DatatypeConstants.FIELD_UNDEFINED);
                 }
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
index d8ab5bd..4d561f8 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
@@ -26,7 +26,7 @@ import org.opengis.temporal.PeriodDuration;
 import org.opengis.temporal.TemporalFactory;
 import org.opengis.util.InternationalString;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.XmlUtilities;
+import org.apache.sis.internal.xml.XmlUtilities;
 import org.apache.sis.internal.jaxb.gco.PropertyType;
 import org.apache.sis.internal.util.TemporalUtilities;
 import org.apache.sis.util.iso.SimpleInternationalString;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/Country.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/Country.java
index 11bfee2..f9fb9ce 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/Country.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/Country.java
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlElement;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.GO_CharacterString;
 import org.apache.sis.internal.jaxb.gco.CharSequenceAdapter;
 import org.apache.sis.util.resources.Errors;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java
index 01a1b33..233ed92 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_Locale.java
@@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import org.apache.sis.internal.jaxb.code.MD_CharacterSetCode;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.Context;
 
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
index 9c656a3..709e198 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ReferenceSystemMetadata.java
@@ -28,7 +28,7 @@ import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
 import org.apache.sis.internal.jaxb.metadata.RS_Identifier;
 import org.apache.sis.internal.simple.SimpleIdentifiedObject;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.xml.Namespaces;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java
index ece5628..623bd7b 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java
@@ -33,7 +33,7 @@ import org.opengis.parameter.ParameterDirection;
 import org.opengis.parameter.ParameterDescriptor;
 import org.apache.sis.internal.simple.SimpleIdentifiedObject;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.GO_GenericName;
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.metadata.NameToIdentifier;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
index d5335c1..16aece8 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/package-info.java
@@ -60,7 +60,7 @@ import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.code.SV_ParameterDirection;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.xml.Namespaces;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/package-info.java
index 39355f1..ecd1f15 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/package-info.java
@@ -34,6 +34,7 @@
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Cullen Rombach (Image Matters)
+ * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
  * @since   0.3
  * @module
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/LegacyNamespaces.java
similarity index 99%
rename from core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
rename to core/sis-metadata/src/main/java/org/apache/sis/internal/xml/LegacyNamespaces.java
index 93c623f..643fba1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/LegacyNamespaces.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb;
+package org.apache.sis.internal.xml;
 
 import org.apache.sis.util.Version;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Schemas.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/Schemas.java
similarity index 99%
rename from core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Schemas.java
rename to core/sis-metadata/src/main/java/org/apache/sis/internal/xml/Schemas.java
index d6ce85d..ff5f307 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/Schemas.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/Schemas.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb;
+package org.apache.sis.internal.xml;
 
 
 /**
diff --git a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StreamWriterDelegate.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java
similarity index 98%
rename from storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StreamWriterDelegate.java
rename to core/sis-metadata/src/main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java
index 60e7cac..454c602 100644
--- a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StreamWriterDelegate.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.storage.xml.stream;
+package org.apache.sis.internal.xml;
 
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.stream.XMLStreamException;
@@ -38,7 +38,7 @@ import org.apache.sis.util.Workaround;
  * @module
  */
 @Workaround(library = "JDK", version = "1.8")
-class StreamWriterDelegate implements XMLStreamWriter {
+public class StreamWriterDelegate implements XMLStreamWriter {
     /**
      * Where to write the XML.
      */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/XmlUtilities.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/XmlUtilities.java
similarity index 98%
rename from core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/XmlUtilities.java
rename to core/sis-metadata/src/main/java/org/apache/sis/internal/xml/XmlUtilities.java
index d0ebdea..0548532 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/XmlUtilities.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/XmlUtilities.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb;
+package org.apache.sis.internal.xml;
 
 import java.util.Date;
 import java.util.Locale;
@@ -25,6 +25,7 @@ import javax.xml.datatype.DatatypeFactory;
 import javax.xml.datatype.DatatypeConfigurationException;
 import org.apache.sis.internal.system.SystemListener;
 import org.apache.sis.internal.system.Modules;
+import org.apache.sis.internal.jaxb.Context;
 
 import static javax.xml.datatype.DatatypeConstants.FIELD_UNDEFINED;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/package-info.java
similarity index 60%
copy from core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/package-info.java
copy to core/sis-metadata/src/main/java/org/apache/sis/internal/xml/package-info.java
index 39355f1..01200a3 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/package-info.java
@@ -16,26 +16,22 @@
  */
 
 /**
- * A set of helper classes for JAXB handling in the SIS implementation.
+ * A set of helper classes for XML handling in the SIS implementation.
  *
  * <strong>Do not use!</strong>
  *
  * This package is for internal use by SIS only. Classes in this package
  * may change in incompatible ways in any future version without notice.
  *
- * <div class="section">Main content</div>
- * {@link org.apache.sis.internal.jaxb.IdentifierMapAdapter} is our internal implementation of
- * the public {@link org.apache.sis.xml.IdentifierMap} interface. The actual implementation is
- * usually the {@code ModifiableIdentifierMap} subclass.
- *
- * <p>{@link org.apache.sis.internal.jaxb.SpecializedIdentifier} wraps {@link org.apache.sis.xml.XLink},
- * {@link java.net.URI} and {@link java.util.UUID} as {@link org.opengis.metadata.Identifier} instances.
- * This is used for storing the value in a list of identifiers while preserving the original object.</p>
+ * <p>The content of this class is independent of our JAXB usage, except
+ * {@link org.apache.sis.internal.jaxb.Context} which is used for fetching
+ * locale and timezone information.</p>
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Cullen Rombach (Image Matters)
+ * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
- * @since   0.3
+ * @since   1.0
  * @module
  */
-package org.apache.sis.internal.jaxb;
+package org.apache.sis.internal.xml;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java
index a810d70..c241468 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java
@@ -33,7 +33,7 @@ import org.apache.sis.util.iso.Types;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.xml.NilReason;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
index 8720ff6..ec44f79 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
@@ -67,7 +67,7 @@ import org.apache.sis.internal.metadata.OtherLocales;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.jaxb.lan.LocaleAdapter;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
index 96a13d3..110240a 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
@@ -32,7 +32,7 @@ import org.opengis.metadata.identification.BrowseGraphic;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
 import org.apache.sis.metadata.TitleProperty;
 import org.apache.sis.metadata.iso.ISOMetadata;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
index 64764c7..7330b71 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
@@ -33,7 +33,7 @@ import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.util.resources.Messages;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.InternationalStringAdapter;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
index afa89f6..22013fe 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
@@ -31,7 +31,7 @@ import org.opengis.metadata.citation.ResponsibleParty;
 import org.opengis.metadata.citation.Role;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.iso.Types;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
index 20d21aa..1cec7aa 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
@@ -28,7 +28,7 @@ import org.opengis.metadata.citation.TelephoneType;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.StringAdapter;
 import org.apache.sis.internal.jaxb.code.CI_TelephoneTypeCode;
 import org.apache.sis.internal.metadata.Dependencies;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
index 41bd627..54beba2 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/package-info.java
@@ -131,7 +131,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.metadata.*;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java
index 474e423..6f2a153 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultCoverageDescription.java
@@ -34,7 +34,7 @@ import org.opengis.util.RecordType;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
 
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
index 093d6d8..ca330d9 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java
@@ -27,7 +27,7 @@ import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.content.FeatureCatalogueDescription;
 import org.opengis.metadata.content.FeatureTypeInfo;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.lan.LocaleAdapter;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
index efa8d58..e476034 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultImageDescription.java
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.Identifier;
 import org.opengis.metadata.content.ImageDescription;
 import org.opengis.metadata.content.ImagingCondition;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.measure.ValueRange;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java
index 832368a..52667b6 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultRangeDimension.java
@@ -30,7 +30,7 @@ import org.opengis.metadata.content.SampleDimension;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.metadata.TitleProperty;
 import org.apache.sis.internal.metadata.Dependencies;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.internal.jaxb.gco.InternationalStringAdapter;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
index aade6d0..dd699be 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/package-info.java
@@ -129,7 +129,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.lan.PT_Locale;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
index 8aea865..ee2dffb 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultDataFile.java
@@ -28,7 +28,7 @@ import org.opengis.metadata.distribution.DataFile;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gcx.MimeFileTypeAdapter;
 import org.opengis.util.InternationalString;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
index dc1cbc4..5327b7c 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultFormat.java
@@ -30,7 +30,7 @@ import org.opengis.metadata.distribution.Distributor;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.metadata.MD_Medium;
 import org.apache.sis.internal.jaxb.metadata.CI_Citation;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
index 54e75a3..859b300 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
@@ -34,7 +34,7 @@ import org.apache.sis.metadata.TitleProperty;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.gco.GO_Real;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
 import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
 import org.apache.sis.internal.metadata.Dependencies;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
index 3025f16..23a2c17 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/package-info.java
@@ -114,7 +114,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.metadata.*;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
index 4ff5e99..68dc0e8 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java
@@ -47,7 +47,7 @@ import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 import org.apache.sis.internal.jaxb.metadata.MD_Identifier;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.util.iso.Types;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
index 9712b0c..a2264b4 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
@@ -31,7 +31,7 @@ import org.opengis.metadata.identification.AssociationType;
 import org.opengis.metadata.identification.InitiativeType;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.internal.metadata.Dependencies;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.code.DS_AssociationTypeCode;
 import org.apache.sis.internal.jaxb.code.DS_InitiativeTypeCode;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
index 9260bb5..e0b8d5a 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultCoupledResource.java
@@ -30,7 +30,7 @@ import org.opengis.metadata.identification.OperationMetadata;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.jaxb.metadata.SV_OperationMetadata;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.GO_GenericName;
 import org.apache.sis.util.iso.DefaultNameSpace;
 import org.apache.sis.util.iso.Names;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
index 4a12fa6..2882b6d 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultDataIdentification.java
@@ -29,7 +29,7 @@ import org.opengis.metadata.identification.TopicCategory;
 import org.opengis.metadata.identification.DataIdentification;
 import org.apache.sis.internal.metadata.OtherLocales;
 import org.apache.sis.internal.jaxb.lan.LocaleAdapter;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.FilterByVersion;
 import org.apache.sis.internal.util.CollectionsExt;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
index 4afb6e8..beea71d 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/package-info.java
@@ -161,7 +161,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.lan.PT_Locale;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.gts.*;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
index b73d362..f652454 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStep.java
@@ -36,7 +36,7 @@ import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.metadata.TitleProperty;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gml.TM_Primitive;
 import org.apache.sis.internal.jaxb.metadata.MD_Scope;
 import org.apache.sis.internal.util.TemporalUtilities;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
index 1452d7d..de8c25e 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultSource.java
@@ -42,7 +42,7 @@ import org.apache.sis.internal.jaxb.metadata.RS_ReferenceSystem;
 import org.apache.sis.internal.jaxb.metadata.MD_Resolution;
 import org.apache.sis.internal.jaxb.metadata.MD_Scope;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.util.iso.Types;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java
index 904b98c..9080572 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/package-info.java
@@ -107,6 +107,6 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.metadata.*;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
index ff26354..11d8293 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultMaintenanceInformation.java
@@ -38,7 +38,7 @@ import org.apache.sis.metadata.iso.citation.DefaultCitationDate;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 import org.apache.sis.internal.metadata.Dependencies;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
index 57e9225..d1fec26 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/package-info.java
@@ -102,7 +102,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.gts.TM_PeriodDuration;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
index f919127..a691238 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/package-info.java
@@ -141,7 +141,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.lan.PT_Locale;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
index a6a563c..c759508 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java
@@ -40,7 +40,7 @@ import org.opengis.util.InternationalString;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.internal.system.Semaphores;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.util.collection.CheckedContainer;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.xml.Namespaces;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
index 4dd2d9b..b275193 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultDataQuality.java
@@ -28,7 +28,7 @@ import org.opengis.metadata.maintenance.ScopeCode;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import org.apache.sis.metadata.iso.maintenance.DefaultScope;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
index 2696473..2d49377 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultQuantitativeResult.java
@@ -26,7 +26,7 @@ import org.opengis.util.InternationalString;
 import org.opengis.util.Record;
 import org.opengis.util.RecordType;
 import org.apache.sis.internal.jaxb.FilterByVersion;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
index 9d9f07fb..ce8c862 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/DefaultUsability.java
@@ -19,7 +19,7 @@ package org.apache.sis.metadata.iso.quality;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.quality.Usability;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
index 0babbe2..32edc9b 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/package-info.java
@@ -160,7 +160,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gco.*;
 import org.apache.sis.internal.jaxb.code.*;
 import org.apache.sis.internal.jaxb.metadata.*;
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/InputFactory.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/InputFactory.java
index 8b47bb9..e90136b 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/InputFactory.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/InputFactory.java
@@ -22,6 +22,7 @@ import javax.xml.stream.XMLEventReader;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.util.StreamReaderDelegate;
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.sax.SAXSource;
@@ -42,7 +43,11 @@ import org.apache.sis.util.Static;
  */
 final class InputFactory extends Static {
     /**
-     * The SIS-wide factory.
+     * The SIS-wide factory. This factory can be specified by the user, for example using the
+     * {@code javax.xml.stream.XMLInputFactory} system property.
+     *
+     * <div class="note"><b>Note:</b>
+     * {@code XMLInputFactory} has an {@code newDefaultFactory()} method which bypass user settings.</div>
      */
     private static final XMLInputFactory FACTORY = XMLInputFactory.newInstance();
 
@@ -59,6 +64,8 @@ final class InputFactory extends Static {
 
     /**
      * Creates a new reader for the given stream.
+     * It is caller's responsibility to close the given input stream after usage
+     * (it will <strong>not</strong> be done by {@link XMLEventReader#close()}).
      *
      * @param  in  where to read from.
      * @return the reader.
@@ -70,6 +77,8 @@ final class InputFactory extends Static {
 
     /**
      * Creates a new reader for the given stream.
+     * It is caller's responsibility to close the given reader after usage
+     * (it will <strong>not</strong> be done by {@link XMLEventReader#close()}).
      *
      * @param  in  where to read from.
      * @return the reader.
@@ -97,8 +106,8 @@ final class InputFactory extends Static {
      * @return the reader.
      * @throws XMLStreamException if the reader can not be created.
      */
-    public static XMLEventReader createXMLEventReader(final XMLStreamReader in) throws XMLStreamException {
-        return FACTORY.createXMLEventReader(in);
+    public static XMLEventReader createXMLEventReader(final Node in) throws XMLStreamException {
+        return FACTORY.createXMLEventReader(new DOMSource(in));
     }
 
     /**
@@ -108,18 +117,24 @@ final class InputFactory extends Static {
      * @return the reader.
      * @throws XMLStreamException if the reader can not be created.
      */
-    public static XMLEventReader createXMLEventReader(final Node in) throws XMLStreamException {
-        return FACTORY.createXMLEventReader(new DOMSource(in));
+    public static XMLEventReader createXMLEventReader(final Source in) throws XMLStreamException {
+        return FACTORY.createXMLEventReader(in);
     }
 
     /**
      * Creates a new reader for the given source.
+     * It is caller's responsibility to close the given stream reader after usage
+     * (it will <strong>not</strong> be done by {@link XMLEventReader#close()}).
      *
      * @param  in  where to read from.
      * @return the reader.
      * @throws XMLStreamException if the reader can not be created.
      */
-    public static XMLEventReader createXMLEventReader(final Source in) throws XMLStreamException {
-        return FACTORY.createXMLEventReader(in);
+    public static XMLEventReader createXMLEventReader(final XMLStreamReader in) throws XMLStreamException {
+        return FACTORY.createXMLEventReader(new StreamReaderDelegate(in) {
+            @Override public void close() throws XMLStreamException {
+                // Do not close the XMLStreamReader because user may continue reading from it.
+            }
+        });
     }
 }
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java
index 50ccf90..5c6ef61 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/Namespaces.java
@@ -22,7 +22,7 @@ import java.util.Locale;
 import javax.xml.XMLConstants;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/OutputFactory.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/OutputFactory.java
index 0f6162b..ba6736a 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/OutputFactory.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/OutputFactory.java
@@ -29,6 +29,7 @@ import javax.xml.transform.stax.StAXResult;
 import org.w3c.dom.Node;
 import org.xml.sax.ContentHandler;
 import org.apache.sis.util.Static;
+import org.apache.sis.internal.xml.StreamWriterDelegate;
 
 
 /**
@@ -43,7 +44,11 @@ import org.apache.sis.util.Static;
  */
 final class OutputFactory extends Static {
     /**
-     * The SIS-wide factory.
+     * The SIS-wide factory. This factory can be specified by the user, for example using the
+     * {@code javax.xml.stream.XMLOutputFactory} system property.
+     *
+     * <div class="note"><b>Note:</b>
+     * {@code XMLOutputFactory} has an {@code newDefaultFactory()} method which bypass user settings.</div>
      */
     private static final XMLOutputFactory FACTORY = XMLOutputFactory.newInstance();
 
@@ -60,6 +65,8 @@ final class OutputFactory extends Static {
 
     /**
      * Creates a new writer for the given stream.
+     * It is caller's responsibility to close the given output stream after usage
+     * (it will <strong>not</strong> be done by {@link XMLEventWriter#close()}).
      *
      * @param  out       where to write to.
      * @param  encoding  the document encoding (usually {@code "UTF-8"}).
@@ -72,6 +79,8 @@ final class OutputFactory extends Static {
 
     /**
      * Creates a new writer for the given stream.
+     * It is caller's responsibility to close the given writer after usage
+     * (it will <strong>not</strong> be done by {@link XMLEventWriter#close()}).
      *
      * @param  out  where to write to.
      * @return the writer.
@@ -113,19 +122,31 @@ final class OutputFactory extends Static {
      * @return the writer.
      * @throws XMLStreamException if the writer can not be created.
      */
-    public static XMLEventWriter createXMLEventWriter(final XMLStreamWriter out) throws XMLStreamException {
-        return FACTORY.createXMLEventWriter(new StAXResult(out));
+    public static XMLEventWriter createXMLEventWriter(final Result out) throws XMLStreamException {
+        return FACTORY.createXMLEventWriter(out);
     }
 
     /**
      * Creates a new writer for the JAXP result.
      * Note that this method is identified as <em>optional</em> in JSE javadoc.
+     * It is caller's responsibility to close the given stream writer after usage
+     * (it will <strong>not</strong> be done by {@link XMLEventWriter#close()}).
      *
      * @param  out  where to write to.
      * @return the writer.
      * @throws XMLStreamException if the writer can not be created.
      */
-    public static XMLEventWriter createXMLEventWriter(final Result out) throws XMLStreamException {
-        return FACTORY.createXMLEventWriter(out);
+    public static XMLEventWriter createXMLEventWriter(final XMLStreamWriter out) throws XMLStreamException {
+        return FACTORY.createXMLEventWriter(new StAXResult(new StreamWriterDelegate(out) {
+            @Override public void close() throws XMLStreamException {
+                /*
+                 * Do not close the XMLStreamWriter because user may continue writing to it.
+                 * Do not flush neither; the default XMLStreamWriterImpl does nothing more
+                 * than forwarding to java.io.Writer.flush() and flushing an output stream
+                 * have a performance impact. If the user really wants to flush, (s)he can
+                 * invoke XMLStreamWriter.flush() himself.
+                 */
+            }
+        }));
     }
 }
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/Pooled.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/Pooled.java
index 0c03bd4..3bf4389 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/Pooled.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/Pooled.java
@@ -37,7 +37,7 @@ import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.logging.WarningListener;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.TypeRegistration;
 
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformVersion.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformVersion.java
index 3af833e..3b988c2 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformVersion.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformVersion.java
@@ -20,7 +20,7 @@ import java.util.Map;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Collections;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformingWriter.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformingWriter.java
index 7f10368..80e63a3 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformingWriter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/TransformingWriter.java
@@ -39,7 +39,7 @@ import javax.xml.namespace.NamespaceContext;
 import javax.xml.namespace.QName;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.CollectionsExt;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 import static javax.xml.stream.XMLStreamConstants.*;
 
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/cat/CodeListMarshallingTest.java b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/cat/CodeListMarshallingTest.java
index 47845fe..e0e91b5 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/cat/CodeListMarshallingTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/cat/CodeListMarshallingTest.java
@@ -27,8 +27,8 @@ import org.opengis.metadata.citation.CitationDate;
 import org.opengis.metadata.citation.Responsibility;
 import org.opengis.metadata.citation.PresentationForm;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
-import org.apache.sis.internal.jaxb.Schemas;
+import org.apache.sis.internal.xml.LegacyNamespaces;
+import org.apache.sis.internal.xml.Schemas;
 import org.apache.sis.xml.XML;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.xml.MarshallerPool;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/MeasureTest.java b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/MeasureTest.java
index c95df90..f34f616 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/MeasureTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/MeasureTest.java
@@ -18,7 +18,7 @@ package org.apache.sis.internal.jaxb.gml;
 
 import java.net.URISyntaxException;
 import org.apache.sis.measure.Units;
-import org.apache.sis.internal.jaxb.Schemas;
+import org.apache.sis.internal.xml.Schemas;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java
index 14c0a22..22b373d 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/gml/TimePeriodTest.java
@@ -27,7 +27,7 @@ import javax.xml.datatype.DatatypeConfigurationException;
 import org.apache.sis.xml.XML;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.xml.MarshallerPool;
-import org.apache.sis.internal.jaxb.XmlUtilities;
+import org.apache.sis.internal.xml.XmlUtilities;
 import org.apache.sis.test.XMLTestCase;
 import org.junit.BeforeClass;
 import org.junit.AfterClass;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/FreeTextMarshallingTest.java b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/FreeTextMarshallingTest.java
index ea8f148..56ea49e 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/FreeTextMarshallingTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/FreeTextMarshallingTest.java
@@ -20,7 +20,7 @@ import java.util.Locale;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.citation.Citation;
 import org.apache.sis.util.iso.DefaultInternationalString;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.test.XMLTestCase;
 import org.junit.Test;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java
index a39265c..217101e 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/lan/LanguageCodeTest.java
@@ -26,8 +26,8 @@ import javax.xml.bind.JAXBException;
 import org.opengis.metadata.Metadata;
 import org.apache.sis.xml.XML;
 import org.apache.sis.xml.MarshallerPool;
-import org.apache.sis.internal.jaxb.Schemas;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.Schemas;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.test.mock.MetadataMock;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.XMLTestCase;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/XmlUtilitiesTest.java b/core/sis-metadata/src/test/java/org/apache/sis/internal/xml/XmlUtilitiesTest.java
similarity index 98%
rename from core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/XmlUtilitiesTest.java
rename to core/sis-metadata/src/test/java/org/apache/sis/internal/xml/XmlUtilitiesTest.java
index cbc314a..851bfb5 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/XmlUtilitiesTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/internal/xml/XmlUtilitiesTest.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.jaxb;
+package org.apache.sis.internal.xml;
 
 import java.util.Date;
 import java.util.Locale;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
index c8c7576..7ebea8b 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
@@ -24,7 +24,7 @@ import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.internal.simple.SimpleCitation;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.test.DependsOnMethod;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
index 24362b9..e298fce 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultResponsibilityTest.java
@@ -19,7 +19,7 @@ package org.apache.sis.metadata.iso.citation;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.citation.Role;
 import org.apache.sis.test.XMLTestCase;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.junit.Test;
 
 import static java.util.Collections.singleton;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
index b3fdf69..0f2f8f6 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
@@ -19,7 +19,7 @@ package org.apache.sis.metadata.iso.constraint;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.constraint.Restriction;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.test.XMLTestCase;
 import org.junit.Test;
 
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
index 6941247..ba6753e 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
@@ -19,9 +19,9 @@ package org.apache.sis.metadata.iso.identification;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.identification.RepresentativeFraction;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.Schemas;
+import org.apache.sis.internal.xml.Schemas;
 import org.apache.sis.test.LoggingWatcher;
 import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOn;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java
index e51fa5f..2c94383 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java
@@ -19,7 +19,7 @@ package org.apache.sis.metadata.iso.lineage;
 import javax.xml.bind.JAXBException;
 import org.opengis.metadata.lineage.Source;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.metadata.iso.DefaultIdentifier;
 import org.apache.sis.test.DependsOnMethod;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java b/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
index ed5beb8..985c525 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
@@ -27,7 +27,7 @@ import org.apache.sis.io.wkt.Symbols;
 import org.apache.sis.io.wkt.WKTFormat;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 // Branch-specific imports
 import org.opengis.metadata.citation.Responsibility;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/XMLComparator.java b/core/sis-metadata/src/test/java/org/apache/sis/test/XMLComparator.java
index 4cf5446..0b8a13d 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/XMLComparator.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/XMLComparator.java
@@ -43,7 +43,7 @@ import org.w3c.dom.Text;
 import org.xml.sax.SAXException;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 import static java.lang.StrictMath.*;
 import static org.opengis.test.Assert.*;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/XMLTestCase.java b/core/sis-metadata/src/test/java/org/apache/sis/test/XMLTestCase.java
index a037d28..77fd71d 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/XMLTestCase.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/XMLTestCase.java
@@ -31,8 +31,8 @@ import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.JAXBException;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
-import org.apache.sis.internal.jaxb.Schemas;
+import org.apache.sis.internal.xml.LegacyNamespaces;
+import org.apache.sis.internal.xml.Schemas;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Version;
 import org.apache.sis.xml.Namespaces;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/mock/MetadataMock.java b/core/sis-metadata/src/test/java/org/apache/sis/test/mock/MetadataMock.java
index efddaa9..5479bc2 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/mock/MetadataMock.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/mock/MetadataMock.java
@@ -22,7 +22,7 @@ import java.util.Collections;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.lan.LocaleAdapter;
 import org.apache.sis.internal.simple.SimpleMetadata;
 import org.apache.sis.xml.Namespaces;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java b/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
index 766fcf5..fc59b4c 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
@@ -66,7 +66,7 @@ import org.junit.BeforeClass;
     org.apache.sis.xml.OGCNamespacePrefixMapperTest.class,
     org.apache.sis.xml.MarshallerPoolTest.class,
     org.apache.sis.xml.TransformingNamespacesTest.class,
-    org.apache.sis.internal.jaxb.XmlUtilitiesTest.class,
+    org.apache.sis.internal.xml.XmlUtilitiesTest.class,
     org.apache.sis.internal.jaxb.IdentifierMapAdapterTest.class,
     org.apache.sis.internal.jaxb.ModifiableIdentifierMapTest.class,
     org.apache.sis.internal.jaxb.gco.StringAdapterTest.class,
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
index f8e069e..1fc2fbf 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/AnnotationConsistencyCheck.java
@@ -39,8 +39,8 @@ import org.opengis.util.CodeList;
 import org.opengis.util.ControlledVocabulary;
 import org.apache.sis.util.ArraysExt;
 import org.apache.sis.xml.Namespaces;
-import org.apache.sis.internal.jaxb.Schemas;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.Schemas;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestUtilities;
 import org.apache.sis.test.TestCase;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/PackageVerifier.java b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/PackageVerifier.java
index 760e895..a964214 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/xml/PackageVerifier.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/xml/PackageVerifier.java
@@ -40,7 +40,7 @@ import org.opengis.annotation.UML;
 import org.opengis.geoapi.SchemaException;
 import org.apache.sis.util.Classes;
 import org.apache.sis.internal.system.Modules;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.xml.Namespaces;
 
 
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/util/iso/NameMarshallingTest.java b/core/sis-metadata/src/test/java/org/apache/sis/util/iso/NameMarshallingTest.java
index 89f3ef1..dd8468a 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/util/iso/NameMarshallingTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/util/iso/NameMarshallingTest.java
@@ -29,7 +29,7 @@ import org.opengis.util.NameSpace;
 import org.apache.sis.xml.XML;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.xml.MarshallerPool;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.test.mock.IdentifiedObjectMock;
 import org.apache.sis.test.XMLTestCase;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/xml/CharSequenceSubstitutionTest.java b/core/sis-metadata/src/test/java/org/apache/sis/xml/CharSequenceSubstitutionTest.java
index 2ac7d9c..136cdf2 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/xml/CharSequenceSubstitutionTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/xml/CharSequenceSubstitutionTest.java
@@ -22,7 +22,7 @@ import org.opengis.metadata.Identifier;
 import org.opengis.metadata.acquisition.Instrument;
 import org.opengis.metadata.identification.DataIdentification;
 import org.opengis.metadata.identification.InitiativeType;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.metadata.SensorType;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.test.DependsOnMethod;
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/xml/RenameListGenerator.java b/core/sis-metadata/src/test/java/org/apache/sis/xml/RenameListGenerator.java
index de0594b..98d6c26 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/xml/RenameListGenerator.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/xml/RenameListGenerator.java
@@ -33,7 +33,7 @@ import javax.xml.bind.annotation.XmlSchema;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import org.opengis.geoapi.SchemaException;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 
 
 /**
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/xml/TransformingNamespacesTest.java b/core/sis-metadata/src/test/java/org/apache/sis/xml/TransformingNamespacesTest.java
index 8735a22..57708a2 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/xml/TransformingNamespacesTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/xml/TransformingNamespacesTest.java
@@ -23,7 +23,7 @@ import java.util.Iterator;
 import java.util.Collection;
 import java.util.Collections;
 import javax.xml.namespace.NamespaceContext;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
index 6e81efc..1b10704 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
@@ -29,7 +29,7 @@ import org.opengis.referencing.datum.VerticalDatumType;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.internal.jaxb.Context;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.metadata.WKTKeywords;
 import org.apache.sis.internal.metadata.VerticalDatumTypes;
 import org.apache.sis.internal.metadata.MetadataUtilities;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java
index e5a428a..a0aaa82 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java
@@ -25,7 +25,7 @@ import org.apache.sis.xml.Namespaces;
 import org.apache.sis.xml.MarshallerPool;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.measure.Units;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOnMethod;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java
index fbd2436..a197300 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultVerticalDatumTest.java
@@ -22,7 +22,7 @@ import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.JAXBException;
 import org.opengis.referencing.datum.VerticalDatumType;
 import org.apache.sis.internal.metadata.VerticalDatumTypes;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.Version;
 import org.apache.sis.xml.XML;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java b/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java
index 4680a8e..4614e0d 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java
@@ -60,7 +60,7 @@ import org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis;
 import org.apache.sis.referencing.cs.DefaultVerticalCS;
 import org.apache.sis.referencing.crs.DefaultVerticalCRS;
 import org.apache.sis.internal.jaxb.metadata.replace.ReferenceSystemMetadata;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.jaxb.gcx.Anchor;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.referencing.NamedIdentifier;
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/StoreProvider.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/StoreProvider.java
index de9d51c..1f60be0 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/StoreProvider.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/StoreProvider.java
@@ -20,7 +20,7 @@ import org.apache.sis.xml.Namespaces;
 import org.apache.sis.storage.DataStore;
 import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.storage.StorageConnector;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.internal.storage.StoreMetadata;
 import org.apache.sis.internal.storage.Capability;
 
diff --git a/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/MimeTypeDetectorTest.java b/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/MimeTypeDetectorTest.java
index 3a53ab3..290e9e1 100644
--- a/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/MimeTypeDetectorTest.java
+++ b/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/MimeTypeDetectorTest.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
 import java.io.StringReader;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.metadata.xml.TestUsingFile;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.test.DependsOnMethod;
 import org.junit.Test;
 
diff --git a/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/StoreTest.java b/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/StoreTest.java
index f04f03e..c251d74 100644
--- a/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/StoreTest.java
+++ b/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/xml/StoreTest.java
@@ -24,7 +24,7 @@ import org.opengis.metadata.citation.*;
 import org.apache.sis.xml.Namespaces;
 import org.apache.sis.storage.StorageConnector;
 import org.apache.sis.storage.DataStoreException;
-import org.apache.sis.internal.jaxb.LegacyNamespaces;
+import org.apache.sis.internal.xml.LegacyNamespaces;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
diff --git a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
index cae0dfd..7fb99cf 100644
--- a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
+++ b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
@@ -19,6 +19,7 @@ package org.apache.sis.internal.storage.xml.stream;
 import java.util.Arrays;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.stream.XMLStreamException;
+import org.apache.sis.internal.xml.StreamWriterDelegate;
 
 
 /**
diff --git a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/NamespaceEraser.java b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/NamespaceEraser.java
index ca73668..a18ae51 100644
--- a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/NamespaceEraser.java
+++ b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/NamespaceEraser.java
@@ -19,6 +19,7 @@ package org.apache.sis.internal.storage.xml.stream;
 import javax.xml.XMLConstants;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.stream.XMLStreamException;
+import org.apache.sis.internal.xml.StreamWriterDelegate;
 
 
 /**
diff --git a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/package-info.java b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/package-info.java
index 5987a51..ac07cc8 100644
--- a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/package-info.java
+++ b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/package-info.java
@@ -24,7 +24,7 @@
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
  * @since   0.8
  * @module
  */


Mime
View raw message