You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2022/12/28 16:07:55 UTC

[sis] 02/06: First round of remplacement of `@preformat` tag by `@snippet`. Apply on Java, SQL, XML, WKT and shell snippets.

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 94c8141b4e13f8ffe40ed5be0da49ec88aafc410
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Dec 28 14:35:37 2022 +0100

    First round of remplacement of `@preformat` tag by `@snippet`.
    Apply on Java, SQL, XML, WKT and shell snippets.
    
    https://issues.apache.org/jira/browse/SIS-565
---
 .../org/apache/sis/console/MimeTypeCommand.java    |   4 +-
 .../java/org/apache/sis/console/package-info.java  |   8 +-
 .../apache/sis/gui/coverage/CoverageCanvas.java    |   4 +-
 .../java/org/apache/sis/gui/map/MapCanvas.java     |   6 +-
 .../java/org/apache/sis/gui/map/MapCanvasAWT.java  |   4 +-
 .../apache/sis/internal/gui/DataStoreOpener.java   |   6 +-
 .../apache/sis/internal/gui/io/FileAccessItem.java |   2 +-
 .../java/org/apache/sis/openoffice/CacheKey.java   |  22 ++--
 .../apache/sis/internal/unopkg/package-info.java   |   2 +-
 .../sis/coverage/grid/BufferedGridCoverage.java    |   6 +-
 .../coverage/grid/CoordinateOperationFinder.java   |  12 +-
 .../org/apache/sis/coverage/grid/GridCoverage.java |   6 +-
 .../sis/coverage/grid/GridCoverageBuilder.java     |  29 +++--
 .../apache/sis/coverage/grid/GridDerivation.java   |  48 ++++---
 .../org/apache/sis/coverage/grid/GridExtent.java   |  12 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |  23 ++--
 .../apache/sis/coverage/grid/ImageRenderer.java    |  25 ++--
 .../grid/IncompleteGridGeometryException.java      |   4 +-
 .../apache/sis/coverage/grid/PixelTranslation.java |  25 ++--
 .../org/apache/sis/feature/AbstractAttribute.java  |  30 ++---
 .../org/apache/sis/feature/AbstractFeature.java    |  40 +++---
 .../apache/sis/feature/DefaultAssociationRole.java |  29 ++---
 .../org/apache/sis/feature/FeatureOperations.java  |  15 +--
 .../sis/feature/builder/AttributeTypeBuilder.java  |  25 ++--
 .../sis/feature/builder/FeatureTypeBuilder.java    |  28 ++--
 .../apache/sis/feature/builder/TypeBuilder.java    |   6 +-
 .../apache/sis/feature/builder/package-info.java   |   4 +-
 .../java/org/apache/sis/filter/Optimization.java   |   4 +-
 .../java/org/apache/sis/image/AnnotatedImage.java  |   4 +-
 .../java/org/apache/sis/image/ComputedImage.java   |  12 +-
 .../java/org/apache/sis/image/MaskedImage.java     |   8 +-
 .../java/org/apache/sis/image/PixelIterator.java   |  32 +++--
 .../java/org/apache/sis/image/PlanarImage.java     |   4 +-
 .../java/org/apache/sis/image/ResampledImage.java  |   4 +-
 .../apache/sis/image/WritablePixelIterator.java    |   4 +-
 .../internal/coverage/j2d/ColorModelFactory.java   |   6 +-
 .../internal/processing/image/TiledProcess.java    |  12 +-
 .../processing/isoline/PolylineBuffer.java         |   4 +-
 .../sis/internal/jaxb/AdapterReplacement.java      |   8 +-
 .../java/org/apache/sis/internal/jaxb/Context.java |  13 +-
 .../sis/internal/jaxb/NonMarshalledAuthority.java  |   4 +-
 .../sis/internal/jaxb/cat/CodeListAdapter.java     |   6 +-
 .../apache/sis/internal/jaxb/cat/CodeListUID.java  |   4 +-
 .../apache/sis/internal/jaxb/cat/EnumAdapter.java  |   2 +-
 .../sis/internal/jaxb/gco/GO_GenericName.java      |   4 +-
 .../org/apache/sis/internal/jaxb/gco/GO_URL.java   |   2 +-
 .../apache/sis/internal/jaxb/gco/Multiplicity.java |   4 +-
 .../apache/sis/internal/jaxb/gco/NameValue.java    |   4 +-
 .../sis/internal/jaxb/gco/ObjectReference.java     |   4 +-
 .../apache/sis/internal/jaxb/gco/PropertyType.java |  24 ++--
 .../apache/sis/internal/jaxb/gco/package-info.java |   4 +-
 .../org/apache/sis/internal/jaxb/gcx/FileName.java |   2 +-
 .../apache/sis/internal/jaxb/gcx/MimeFileType.java |   2 +-
 .../apache/sis/internal/jaxb/gml/DateAdapter.java  |   6 +-
 .../org/apache/sis/internal/jaxb/gml/Measure.java  |   4 +-
 .../sis/internal/jaxb/gml/SC_VerticalCRS.java      |  26 ++--
 .../sis/internal/jaxb/gml/TimePeriodBound.java     |   8 +-
 .../org/apache/sis/internal/jaxb/lan/Country.java  |   2 +-
 .../apache/sis/internal/jaxb/lan/LanguageCode.java |   6 +-
 .../sis/internal/jaxb/lan/LocaleAdapter.java       |   4 +-
 .../apache/sis/internal/jaxb/lan/PT_FreeText.java  |   2 +-
 .../apache/sis/internal/jaxb/lan/PT_Locale.java    |   2 +-
 .../apache/sis/internal/jaxb/lan/TextGroup.java    |   4 +-
 .../sis/internal/jaxb/metadata/package-info.java   |   4 +-
 .../jaxb/metadata/replace/RS_Identifier.java       |   4 +-
 .../jaxb/metadata/replace/ServiceParameter.java    |   4 +-
 .../sis/internal/metadata/sql/SQLBuilder.java      |  14 +-
 .../sis/internal/metadata/sql/SQLUtilities.java    |   8 +-
 .../sis/internal/metadata/sql/ScriptRunner.java    |  16 +--
 .../sis/internal/metadata/sql/package-info.java    |   4 +-
 .../org/apache/sis/metadata/AbstractMetadata.java  |  28 ++--
 .../org/apache/sis/metadata/MetadataStandard.java  |  34 +++--
 .../apache/sis/metadata/ModifiableMetadata.java    |  12 +-
 .../org/apache/sis/metadata/PropertyAccessor.java  |  10 +-
 .../java/org/apache/sis/metadata/TreeNode.java     |   4 +-
 .../org/apache/sis/metadata/TreeNodeChildren.java  |   4 +-
 .../apache/sis/metadata/ValueExistencePolicy.java  |   4 +-
 .../apache/sis/metadata/iso/DefaultIdentifier.java |   6 +-
 .../sis/metadata/iso/citation/Citations.java       |   4 +-
 .../sis/metadata/iso/citation/DefaultCitation.java |  24 ++--
 .../iso/citation/DefaultOnlineResource.java        |   7 +-
 .../apache/sis/metadata/iso/extent/Extents.java    |   4 +-
 .../DefaultRepresentativeFraction.java             |   6 +-
 .../apache/sis/metadata/sql/MetadataSource.java    |  12 +-
 .../apache/sis/metadata/sql/MetadataWriter.java    |   4 +-
 .../org/apache/sis/util/iso/DefaultLocalName.java  |   8 +-
 .../org/apache/sis/util/iso/DefaultNameSpace.java  |  10 +-
 .../org/apache/sis/util/iso/DefaultRecord.java     |  16 +--
 .../org/apache/sis/util/iso/DefaultRecordType.java |  33 +++--
 .../main/java/org/apache/sis/util/iso/Types.java   |  27 ++--
 .../java/org/apache/sis/xml/IdentifiedObject.java  |   4 +-
 .../java/org/apache/sis/xml/IdentifierSpace.java   |   4 +-
 .../java/org/apache/sis/xml/MarshallerPool.java    |  12 +-
 .../main/java/org/apache/sis/xml/NilObject.java    |  12 +-
 .../src/main/java/org/apache/sis/xml/Pooled.java   |   4 +-
 .../main/java/org/apache/sis/xml/Transformer.java  |   8 +-
 .../java/org/apache/sis/xml/ValueConverter.java    |  26 ++--
 .../src/main/java/org/apache/sis/xml/XML.java      |  17 ++-
 .../main/java/org/apache/sis/xml/package-info.java |   8 +-
 .../apache/sis/internal/jaxb/gml/MeasureTest.java  |   6 +-
 .../sis/internal/jaxb/lan/LanguageCodeTest.java    |  16 +--
 .../iso/identification/DefaultResolutionTest.java  |   8 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java   |   4 +-
 .../org/apache/sis/xml/ReferenceResolverMock.java  |   4 +-
 .../org/apache/sis/xml/RenameListGenerator.java    |   2 +-
 .../org/apache/sis/xml/UUIDMarshallingTest.java    |   8 +-
 .../org/apache/sis/xml/XLinkMarshallingTest.java   |   8 +-
 .../org/apache/sis/portrayal/CanvasFollower.java   |   4 +-
 .../gazetteer/AbstractLocationType.java            |   4 +-
 .../gazetteer/MilitaryGridReferenceSystem.java     |  20 +--
 .../gazetteer/ModifiableLocationType.java          |  37 +++---
 .../gazetteer/ReferencingByIdentifiers.java        |   4 +-
 .../sis/geometry/AbstractDirectPosition.java       |   8 +-
 .../org/apache/sis/geometry/AbstractEnvelope.java  |  12 +-
 .../org/apache/sis/geometry/ArrayEnvelope.java     |   6 +-
 .../org/apache/sis/geometry/DirectPosition1D.java  |  10 +-
 .../org/apache/sis/geometry/DirectPosition2D.java  |  10 +-
 .../java/org/apache/sis/geometry/Envelope2D.java   |   4 +-
 .../apache/sis/geometry/GeneralDirectPosition.java |   6 +-
 .../org/apache/sis/geometry/GeneralEnvelope.java   |  18 +--
 .../org/apache/sis/geometry/ImmutableEnvelope.java |   6 +-
 .../org/apache/sis/geometry/WraparoundMethod.java  |  20 +--
 .../internal/jaxb/referencing/RS_Identifier.java   |   6 +-
 .../jaxb/referencing/SecondDefiningParameter.java  |   4 +-
 .../sis/internal/referencing/ExtentSelector.java   |   4 +-
 .../apache/sis/internal/referencing/Formulas.java  |   4 +-
 .../referencing/GeodeticObjectBuilder.java         |  35 +++--
 .../apache/sis/internal/referencing/Legacy.java    |   4 +-
 .../internal/referencing/PositionTransformer.java  |   4 +-
 .../referencing/j2d/IntervalRectangle.java         |  12 +-
 .../apache/sis/internal/referencing/j2d/Tile.java  |   7 +-
 .../main/java/org/apache/sis/io/wkt/Element.java   |  28 ++--
 .../main/java/org/apache/sis/io/wkt/Formatter.java |  14 +-
 .../apache/sis/io/wkt/GeodeticObjectParser.java    |  84 ++++++------
 .../java/org/apache/sis/io/wkt/StoredTree.java     |   4 +-
 .../main/java/org/apache/sis/io/wkt/Symbols.java   |  16 +--
 .../java/org/apache/sis/io/wkt/VerticalInfo.java   |   4 +-
 .../java/org/apache/sis/io/wkt/WKTDictionary.java  |   4 +-
 .../main/java/org/apache/sis/io/wkt/WKTFormat.java |  17 ++-
 .../main/java/org/apache/sis/io/wkt/Warnings.java  |   4 +-
 .../sis/parameter/DefaultParameterDescriptor.java  |   8 +-
 .../parameter/DefaultParameterDescriptorGroup.java |   7 +-
 .../sis/parameter/DefaultParameterValue.java       |  20 +--
 .../sis/parameter/DefaultParameterValueGroup.java  |  23 ++--
 .../org/apache/sis/parameter/ParameterBuilder.java |  65 +++++-----
 .../java/org/apache/sis/parameter/Parameters.java  |   4 +-
 .../org/apache/sis/parameter/TensorParameters.java |  22 ++--
 .../org/apache/sis/parameter/package-info.java     |   9 +-
 .../sis/referencing/AbstractIdentifiedObject.java  |  19 +--
 .../java/org/apache/sis/referencing/Builder.java   |  45 ++++---
 .../main/java/org/apache/sis/referencing/CRS.java  |  35 ++---
 .../java/org/apache/sis/referencing/CommonCRS.java |  23 ++--
 .../apache/sis/referencing/IdentifiedObjects.java  |  20 +--
 .../sis/referencing/ImmutableIdentifier.java       |  10 +-
 .../apache/sis/referencing/crs/AbstractCRS.java    |   6 +-
 .../sis/referencing/crs/DefaultEngineeringCRS.java |  20 +--
 .../sis/referencing/crs/DefaultGeocentricCRS.java  |  17 +--
 .../sis/referencing/crs/DefaultGeodeticCRS.java    |  16 +--
 .../sis/referencing/crs/DefaultGeographicCRS.java  |  17 +--
 .../sis/referencing/crs/DefaultImageCRS.java       |  14 +-
 .../sis/referencing/crs/DefaultProjectedCRS.java   |  13 +-
 .../org/apache/sis/referencing/cs/AbstractCS.java  |  11 +-
 .../org/apache/sis/referencing/cs/AxisFilter.java  |  18 ++-
 .../sis/referencing/cs/CoordinateSystems.java      |  26 ++--
 .../sis/referencing/datum/DatumShiftGrid.java      |  10 +-
 .../sis/referencing/datum/DefaultEllipsoid.java    |   4 +-
 .../referencing/datum/DefaultGeodeticDatum.java    |  28 ++--
 .../referencing/datum/DefaultPrimeMeridian.java    |  12 +-
 .../referencing/datum/DefaultTemporalDatum.java    |   4 +-
 .../referencing/datum/DefaultVerticalDatum.java    |   4 +-
 .../referencing/factory/AuthorityFactoryProxy.java |   8 +-
 .../factory/ConcurrentAuthorityFactory.java        |   4 +-
 .../referencing/factory/GeodeticObjectFactory.java |   9 +-
 .../factory/sql/CoordinateOperationSet.java        |   8 +-
 .../referencing/factory/sql/EPSGCodeFinder.java    |   8 +-
 .../referencing/factory/sql/EPSGDataAccess.java    |  10 +-
 .../sis/referencing/factory/sql/EPSGFactory.java   |   4 +-
 .../sis/referencing/factory/sql/EPSGInstaller.java |   4 +-
 .../factory/sql/InstallationScriptProvider.java    |  22 ++--
 .../sis/referencing/factory/sql/TableInfo.java     |   6 +-
 .../operation/AbstractCoordinateOperation.java     |   4 +-
 .../DefaultCoordinateOperationFactory.java         |   6 +-
 .../operation/DefaultOperationMethod.java          |  15 ++-
 .../operation/builder/LinearTransformBuilder.java  |   8 +-
 .../operation/builder/LocalizationGridBuilder.java |   7 +-
 .../operation/matrix/AffineTransforms2D.java       |  16 +--
 .../sis/referencing/operation/matrix/Matrices.java |  36 +++---
 .../referencing/operation/matrix/MatrixSIS.java    |   4 +-
 .../sis/referencing/operation/matrix/Solver.java   |  16 +--
 .../projection/LambertConicConformal.java          |   9 +-
 .../operation/projection/NormalizedProjection.java |   4 +-
 .../operation/transform/AbstractMathTransform.java |   8 +-
 .../operation/transform/ContextualParameters.java  |   6 +-
 .../transform/DefaultMathTransformFactory.java     |  16 +--
 .../operation/transform/DomainDefinition.java      |   4 +-
 .../transform/EllipsoidToCentricTransform.java     |   8 +-
 .../transform/ExponentialTransform1D.java          |  11 +-
 .../transform/InterpolatedGeocentricTransform.java |   8 +-
 .../operation/transform/IterationStrategy.java     |   4 +-
 .../operation/transform/MathTransformProvider.java |  15 +--
 .../operation/transform/MathTransforms.java        |  12 +-
 .../operation/transform/PassThroughTransform.java  |  21 +--
 .../operation/transform/TransformSeparator.java    |  10 +-
 .../operation/transform/WraparoundTransform.java   |   4 +-
 .../org/apache/sis/referencing/package-info.java   |  34 ++---
 .../java/org/apache/sis/io/wkt/WKTParserTest.java  | 104 +++++++--------
 .../sis/referencing/factory/TestFactorySource.java |   8 +-
 .../operation/CoordinateOperationFinderTest.java   |   4 +-
 .../operation/CoordinateOperationRegistryTest.java |   4 +-
 .../DefaultCoordinateOperationFactoryTest.java     |   4 +-
 .../operation/HardCodedConversions.java            |   4 +-
 .../operation/projection/AlbersEqualAreaTest.java  |   4 +-
 .../operation/transform/PoleRotationTest.java      |   4 +-
 .../sis/internal/converter/ConverterRegistry.java  |   4 +-
 .../sis/internal/converter/FallbackConverter.java  |   4 +-
 .../sis/internal/converter/ObjectToString.java     |   4 +-
 .../sis/internal/converter/SystemRegistry.java     |   4 +-
 .../apache/sis/internal/system/DaemonThread.java   |  10 +-
 .../sis/internal/system/OptionalDependency.java    |   4 +-
 .../internal/system/ReferenceQueueConsumer.java    |   6 +-
 .../org/apache/sis/internal/util/DoubleDouble.java | 144 ++++++++++-----------
 .../apache/sis/internal/util/FinalFieldSetter.java |   2 +-
 .../org/apache/sis/internal/util/Numerics.java     |  24 ++--
 .../java/org/apache/sis/internal/util/Strings.java |   4 +-
 .../sis/internal/util/UnmodifiableArrayList.java   |   8 +-
 .../main/java/org/apache/sis/io/TableAppender.java |   4 +-
 .../main/java/org/apache/sis/io/TabularFormat.java |   8 +-
 .../java/org/apache/sis/math/DecimalFunctions.java |  18 ++-
 .../java/org/apache/sis/math/MathFunctions.java    |  12 +-
 .../main/java/org/apache/sis/math/Statistics.java  |  20 +--
 .../src/main/java/org/apache/sis/math/Vector.java  |   4 +-
 .../java/org/apache/sis/measure/AbstractUnit.java  |   4 +-
 .../java/org/apache/sis/measure/AngleFormat.java   |   4 +-
 .../java/org/apache/sis/measure/DerivedScalar.java |   4 +-
 .../org/apache/sis/measure/IdentityConverter.java  |   4 +-
 .../java/org/apache/sis/measure/RangeFormat.java   |   4 +-
 .../java/org/apache/sis/measure/SystemUnit.java    |   4 +-
 .../java/org/apache/sis/measure/ValueRange.java    |  12 +-
 .../java/org/apache/sis/measure/package-info.java  |   8 +-
 .../src/main/java/org/apache/sis/setup/About.java  |   4 +-
 .../java/org/apache/sis/setup/Configuration.java   |   4 +-
 .../main/java/org/apache/sis/setup/OptionKey.java  |  12 +-
 .../main/java/org/apache/sis/util/ArraysExt.java   |  22 ++--
 .../java/org/apache/sis/util/CharSequences.java    |  20 +--
 .../src/main/java/org/apache/sis/util/Classes.java |  11 +-
 .../java/org/apache/sis/util/ComparisonMode.java   |   4 +-
 .../org/apache/sis/util/LenientComparable.java     |   4 +-
 .../src/main/java/org/apache/sis/util/Locales.java |   4 +-
 .../src/main/java/org/apache/sis/util/Numbers.java |  18 ++-
 .../java/org/apache/sis/util/ObjectConverter.java  |   4 +-
 .../java/org/apache/sis/util/ObjectConverters.java |   7 +-
 .../sis/util/ResourceInternationalString.java      |  15 +--
 .../main/java/org/apache/sis/util/Utilities.java   |   8 +-
 .../sis/util/collection/BackingStoreException.java |   4 +-
 .../java/org/apache/sis/util/collection/Cache.java |  44 +++----
 .../sis/util/collection/CheckedContainer.java      |   4 +-
 .../apache/sis/util/collection/CodeListSet.java    |   4 +-
 .../sis/util/collection/DefaultTreeTable.java      |   4 +-
 .../org/apache/sis/util/collection/DerivedSet.java |  12 +-
 .../org/apache/sis/util/collection/RangeSet.java   |   4 +-
 .../apache/sis/util/collection/TableColumn.java    |   8 +-
 .../org/apache/sis/util/collection/TreeTable.java  |  20 +--
 .../org/apache/sis/util/collection/TreeTables.java |   4 +-
 .../apache/sis/util/collection/WeakHashSet.java    |  18 +--
 .../sis/util/collection/WeakValueHashMap.java      |   4 +-
 .../sis/util/resources/IndexedResourceBundle.java  |   4 +-
 .../apache/sis/util/resources/package-info.java    |  12 +-
 .../java/org/apache/sis/io/AppenderTestCase.java   |   4 +-
 .../java/org/apache/sis/test/LoggingWatcher.java   |  16 +--
 .../test/java/org/apache/sis/test/TestCase.java    |   8 +-
 .../test/java/org/apache/sis/test/TestSuite.java   |   4 +-
 .../sis/internal/profile/fra/Constraints.java      |   4 +-
 .../internal/profile/fra/DataIdentification.java   |   4 +-
 .../profile/fra/DirectReferenceSystem.java         |   4 +-
 .../profile/fra/IndirectReferenceSystem.java       |   4 +-
 .../sis/internal/profile/fra/LegalConstraints.java |   4 +-
 .../internal/profile/fra/SecurityConstraints.java  |   4 +-
 .../apache/sis/profile/france/FrenchProfile.java   |   8 +-
 .../apache/sis/storage/geotiff/GeoKeysLoader.java  |   2 +-
 .../sis/storage/geotiff/ImageFileDirectory.java    |  10 +-
 .../apache/sis/storage/geotiff/XMLMetadata.java    |   4 +-
 .../sis/storage/geotiff/XMLMetadataTest.java       |   4 +-
 .../apache/sis/internal/netcdf/GridCacheKey.java   |   4 +-
 .../apache/sis/internal/netcdf/GridMapping.java    |   4 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   4 +-
 .../sis/internal/netcdf/impl/ChannelDecoder.java   |   6 +-
 .../sis/internal/sql/feature/FeatureAnalyzer.java  |   4 +-
 .../apache/sis/internal/stream/DeferredStream.java |   4 +-
 .../internal/storage/FeatureCatalogBuilder.java    |   4 +-
 .../sis/internal/storage/MetadataBuilder.java      |   4 +-
 .../apache/sis/internal/storage/RangeArgument.java |   4 +-
 .../sis/internal/storage/StoreUtilities.java       |   4 +-
 .../sis/internal/storage/TiledGridCoverage.java    |   4 +-
 .../sis/internal/storage/io/ChannelData.java       |   6 +-
 .../sis/internal/storage/io/ChannelDataInput.java  |  16 +--
 .../sis/internal/storage/io/ChannelDataOutput.java |  28 ++--
 .../storage/io/ChannelImageInputStream.java        |  16 +--
 .../internal/storage/io/FileCacheByteChannel.java  |   4 +-
 .../java/org/apache/sis/storage/DataStore.java     |   4 +-
 .../org/apache/sis/storage/DataStoreProvider.java  |   8 +-
 .../java/org/apache/sis/storage/FeatureNaming.java |  11 +-
 .../java/org/apache/sis/storage/FeatureSet.java    |   9 +-
 .../java/org/apache/sis/storage/ProbeResult.java   |   2 +-
 .../apache/sis/storage/event/StoreListeners.java   |   4 +-
 .../org/apache/sis/internal/storage/gpx/Link.java  |   8 +-
 .../apache/sis/internal/storage/gpx/Metadata.java  |   4 +-
 .../apache/sis/internal/storage/gpx/Reader.java    |   4 +-
 .../sis/internal/storage/gpx/package-info.java     |   4 +-
 .../storage/xml/stream/StaxStreamReader.java       |  10 +-
 .../storage/xml/stream/StaxStreamWriter.java       |  16 +--
 310 files changed, 1735 insertions(+), 1751 deletions(-)

diff --git a/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java b/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java
index 34719712b1..2f8d9e17ad 100644
--- a/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java
+++ b/application/sis-console/src/main/java/org/apache/sis/console/MimeTypeCommand.java
@@ -33,9 +33,9 @@ import org.apache.sis.util.CharSequences;
  * This sub-command reproduces the functionality of the following Unix command,
  * except that {@code MimeTypeCommand} uses the SIS detection mechanism instead of the OS one.
  *
- * {@preformat shell
+ * {@snippet lang="shell" :
  *   file --mime-type <files>
- * }
+ *   }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
diff --git a/application/sis-console/src/main/java/org/apache/sis/console/package-info.java b/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
index e2a70eaf41..3831b544f0 100644
--- a/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
+++ b/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
@@ -24,21 +24,21 @@
  * has been {@linkplain org.apache.sis.internal.system.Supervisor#ENABLED compiled with MBeans enabled}
  * and that the remote Java Virtual Machine has been started with the following options:
  *
- * {@preformat shell
+ * {@snippet lang="shell" :
  *   java -Dcom.sun.management.jmxremote.port=1099 \
  *        -Dcom.sun.management.jmxremote.authenticate=false \
  *        -Dcom.sun.management.jmxremote.ssl=false \
  *        -Dcom.sun.management.jmxremote.local.only=true \
  *        <other options>
- * }
+ *   }
  *
  * If the port number is different than {@value java.rmi.registry.Registry#REGISTRY_PORT}, then it must be specified
  * to the {@code sis} subcommand after the host name. For example if the port number has been set to 9999, then the
  * {@code about} sub-command shall be invoked as below:
  *
- * {@preformat shell
+ * {@snippet lang="shell" :
  *   java org.apache.sis.console.Command about localhost:1099
- * }
+ *   }
  *
  * The {@code com.sun.management.jmxremote.local.only} property is recommended if the remote JVM is another
  * JVM instance running on the local machine. Otherwise this property can be omitted for debugging purpose.
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageCanvas.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageCanvas.java
index c441ced897..5ea173549a 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageCanvas.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageCanvas.java
@@ -1160,9 +1160,9 @@ public class CoverageCanvas extends MapCanvasAWT {
      * Other methods should generally not invoke this method directly,
      * and use the following code instead:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     runAfterRendering(this::clear);
-     * }
+     *     }
      *
      * @see #runAfterRendering(Runnable)
      */
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvas.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvas.java
index f881dde4b8..0ff9fc2f5b 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvas.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvas.java
@@ -998,7 +998,7 @@ public abstract class MapCanvas extends PlanarCanvas {
      * Returns the {@linkplain #getInterimTransform(boolean) interim transform} if at least one listener
      * is registered, or {@code null} otherwise. This method should be used with the following pattern:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     AffineTransform2D interim = getInterimTransformForListeners();
      *     transform.something(…);
      *     if (interim != null) {
@@ -1573,9 +1573,9 @@ public abstract class MapCanvas extends PlanarCanvas {
      * Other methods should generally not invoke this method directly,
      * and use the following code instead:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     runAfterRendering(this::clear);
-     * }
+     *     }
      *
      * @see #reset()
      * @see #runAfterRendering(Runnable)
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvasAWT.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvasAWT.java
index 267efa7ce9..c92961efa1 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvasAWT.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/MapCanvasAWT.java
@@ -664,9 +664,9 @@ public abstract class MapCanvasAWT extends MapCanvas {
      * Other methods should generally not invoke this method directly,
      * and use the following code instead:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     runAfterRendering(this::clear);
-     * }
+     *     }
      *
      * @see #runAfterRendering(Runnable)
      */
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/DataStoreOpener.java b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/DataStoreOpener.java
index ee57ad6dc2..46057448fe 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/DataStoreOpener.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/DataStoreOpener.java
@@ -58,9 +58,9 @@ import org.apache.sis.gui.DataViewer;
  * caller should invoke {@link #setOnSucceeded(EventHandler)} for defining such action.
  * Example:
  *
- * {@preformat java
- *     public void loadResource(final Object source) {
- *         final DataStoreOpener opener = new DataStoreOpener(source);
+ * {@snippet lang="java" :
+ *     public void loadResource(Object source) {
+ *         var opener = new DataStoreOpener(source);
  *         opener.setOnSucceeded((event) -> addResource((DataStore) event.getSource().getValue()));
  *         opener.setOnFailed(ExceptionReporter::show);
  *         BackgroundThreads.execute(opener);
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/io/FileAccessItem.java b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/io/FileAccessItem.java
index 133b17b8b6..aa5d433ec1 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/io/FileAccessItem.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/io/FileAccessItem.java
@@ -272,7 +272,7 @@ final class FileAccessItem implements Runnable, EventHandler<ActionEvent> {
     /**
      * Recomputes all rectangles from current {@link #columnWidth} and {@link #accessRanges}.
      *
-     * <h4>Implementation note:</h4>
+     * <h4>Implementation note</h4>
      * This method is inefficient as it iterates over all ranges instead of only the ranges that changed.
      * It should be okay in the common case where file accesses happens often on consecutive blocks,
      * in which case ranges get merged together and the total number of elements in {@link #accessRanges}
diff --git a/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java b/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java
index caea7e638f..c2419a82fc 100644
--- a/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java
+++ b/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/CacheKey.java
@@ -85,17 +85,19 @@ final class CacheKey<T> {
      * Notifies the cache that a value will be computed for this key.
      * This method must be followed by a {@code try} … {@code finally} block as below:
      *
-     * {@preformat java
-     *     T value = key.peek();
-     *     if (value == null) {
-     *         final Cache.Handler<T> handler = key.lock();
-     *         try {
-     *             value = handler.peek();
-     *             if (value == null) {
-     *                 value = createMyObject(key);
+     * {@snippet lang="java" :
+     *     private void compute() {
+     *         T value = key.peek();
+     *         if (value == null) {
+     *             final Cache.Handler<T> handler = key.lock();
+     *             try {
+     *                 value = handler.peek();
+     *                 if (value == null) {
+     *                     value = createMyObject(key);
+     *                 }
+     *             } finally {
+     *                 handler.putAndUnlock(value);
      *             }
-     *         } finally {
-     *             handler.putAndUnlock(value);
      *         }
      *     }
      * }
diff --git a/core/sis-build-helper/src/main/java/org/apache/sis/internal/unopkg/package-info.java b/core/sis-build-helper/src/main/java/org/apache/sis/internal/unopkg/package-info.java
index 01e9e4e32c..7b05df051d 100644
--- a/core/sis-build-helper/src/main/java/org/apache/sis/internal/unopkg/package-info.java
+++ b/core/sis-build-helper/src/main/java/org/apache/sis/internal/unopkg/package-info.java
@@ -38,7 +38,7 @@
  * </ul>
  *
  * <h2>Maven project file</h2>
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <dependencies>
  *     <!-- Put all your project dependencies here, including transitive dependencies. -->
  *   </dependencies>
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
index 07a0549ee3..a158517cf1 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
@@ -103,8 +103,8 @@ public class BufferedGridCoverage extends GridCoverage {
      * <h4>Usage</h4>
      * Implementation of {@link #render(GridExtent)} method can be like below:
      *
-     * {@preformat java
-     *     &#64;Override
+     * {@snippet lang="java" :
+     *     @Override
      *     public RenderedImage render(GridExtent sliceExtent) throws CannotEvaluateException {
      *         if (sliceExtent == null) {
      *             sliceExtent = gridGeometry.getExtent();
@@ -118,7 +118,7 @@ public class BufferedGridCoverage extends GridCoverage {
      *                 return renderer.createImage();
      *             });
      *         } catch (IllegalGridGeometryException | MismatchedDimensionException e) {
-    *              throw e;
+     *             throw e;
      *         } catch (IllegalArgumentException | ArithmeticException | RasterFormatException e) {
      *             throw new CannotEvaluateException(e.getMessage(), e);
      *         }
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/CoordinateOperationFinder.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/CoordinateOperationFinder.java
index e1deb3f3a0..e26c2c6a91 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/CoordinateOperationFinder.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/CoordinateOperationFinder.java
@@ -147,12 +147,12 @@ final class CoordinateOperationFinder implements Supplier<double[]> {
      * This is the concatenation of {@link #source} "grid to CRS" with {@link #forwardChangeOfCRS},
      * possibly with wraparound handling and cached for reuse by {@link #inverse()}:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     forwardChangeOfCRS = changeOfCRS.getMathTransform();
      *     // + wraparound handling if applicable.
      *     gridToCRS = source.getGridToCRS(anchor);
      *     gridToCRS = MathTransforms.concatenate(gridToCRS, forwardChangeOfCRS);
-     * }
+     *     }
      *
      * @see #gridToCRS()
      */
@@ -163,12 +163,12 @@ final class CoordinateOperationFinder implements Supplier<double[]> {
      * This is the concatenation of {@link #inverseChangeOfCRS} with inverse of {@link #source} "grid to CRS",
      * possibly with wraparound handling:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     inverseChangeOfCRS = forwardChangeOfCRS.inverse();
      *     // + wraparound handling if applicable.
      *     crsToGrid = gridToCRS.inverse();
      *     crsToGrid = MathTransforms.concatenate(inverseChangeOfCRS, crsToGrid);
-     * }
+     *     }
      *
      * @see #inverse()
      * @see #applyWraparound(MathTransform)
@@ -209,14 +209,14 @@ final class CoordinateOperationFinder implements Supplier<double[]> {
      * Whether to disable completely all wraparounds checks.
      * If {@code true}, then calculation done in this class should be equivalent to following code:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     forwardChangeOfCRS = changeOfCRS.getMathTransform();
      *     inverseChangeOfCRS = forwardChangeOfCRS.inverse();
      *     gridToCRS          = source.getGridToCRS(anchor);
      *     crsToGrid          = gridToCRS.inverse();
      *     gridToCRS          = MathTransforms.concatenate(gridToCRS, forwardChangeOfCRS);
      *     crsToGrid          = MathTransforms.concatenate(inverseChangeOfCRS, crsToGrid);
-     * }
+     *     }
      *
      * <b>Tip:</b> searching usage of this field should help to identify code doing wraparound handling.
      *
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java
index 5496915d40..8b704c0b03 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverage.java
@@ -491,9 +491,9 @@ public abstract class GridCoverage extends BandedCoverage {
      * Current implementation is equivalent to the following, where {@code <default flags>}
      * is the same set of flags than {@link GridGeometry#toString()}.
      *
-     * {@preformat java
-     *   return toTree(Locale.getDefault(), <default flags>).toString();
-     * }
+     * {@snippet lang="java" :
+     *     return toTree(Locale.getDefault(), <default flags>).toString();
+     *     }
      *
      * @return a string representation of this grid coverage for debugging purpose.
      */
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java
index 1e6e80f0e3..32f8872d19 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageBuilder.java
@@ -60,25 +60,26 @@ import org.apache.sis.util.resources.Errors;
  * Those methods are overloaded with many variants accepting different kind of arguments. For example, values can
  * be specified as a {@link RenderedImage}, a {@link Raster} or some other types.
  *
- * <div class="note"><b>Example:</b>
- * the easiest way to create a {@link GridCoverage} from a matrix of values is to set the values in a
+ * <h2>Example</h2>
+ * The easiest way to create a {@link GridCoverage} from a matrix of values is to set the values in a
  * {@link WritableRaster} and to specify the domain as an {@link Envelope}:
  *
- * {@preformat java
- *     WritableRaster data = Raster.createBandedRaster​(DataBuffer.TYPE_USHORT, width, height, numBands, null);
- *     for (int y=0; y<height; y++) {
- *         for (int x=0; x<width; x++) {
- *             int value = ...;                     // Compute a value here.
- *             data.setSample(x, y, 0, value);      // Set value in the first band.
+ * {@snippet lang="java" :
+ *     public GridCoverage createCoverage() {
+ *         WritableRaster data = Raster.createBandedRaster​(DataBuffer.TYPE_USHORT, width, height, numBands, null);
+ *         for (int y=0; y<height; y++) {
+ *             for (int x=0; x<width; x++) {
+ *                 int value = ...;                     // Compute a value here.
+ *                 data.setSample(x, y, 0, value);      // Set value in the first band.
+ *             }
  *         }
- *     }
- *     GridCoverageBuilder builder = new GridCoverageBuilder();
- *     builder.setValues(data).flixAxis(1);
+ *         var builder = new GridCoverageBuilder();
+ *         builder.setValues(data).flixAxis(1);
  *
- *     Envelope domain = ...;                       // Specify here the "real world" coordinates.
- *     GridCoverage coverage = builder.setDomain(domain).build();
+ *         Envelope domain = ...;                       // Specify here the "real world" coordinates.
+ *         return builder.setDomain(domain).build();
+ *     }
  * }
- * </div>
  *
  * <h2>Limitations</h2>
  * Current implementation creates only two-dimensional coverages.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java
index 5d3050746a..0d7b0c9141 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridDerivation.java
@@ -411,27 +411,9 @@ public class GridDerivation {
      * (coordinate operations are applied as needed if the Coordinate Reference Systems are not the same).
      * The new grid geometry resolution will be integer multiples of the {@link #base} grid geometry resolution.
      *
-     * <div class="note"><b>Usage:</b>
-     * This method can be helpful for implementation of
-     * {@link org.apache.sis.storage.GridCoverageResource#read(GridGeometry, int...)}.
-     * Example:
-     *
-     * {@preformat java
-     *     class MyDataStorage extends GridCoverageResource {
-     *         &#64;Override
-     *         public GridCoverage read(GridGeometry domain, int... range) throws DataStoreException {
-     *             GridDerivation change = getGridGeometry().derive().subgrid(domain);
-     *             GridExtent toRead = change.buildExtent();
-     *             int[] subsampling = change.getSubsampling());
-     *             // Do reading here.
-     *         }
-     *     }
-     * }
-     * </div>
-     *
-     * If {@code gridExtent} contains only an envelope, then this method delegates to {@link #subgrid(Envelope, double...)}.
+     * <p>If {@code gridExtent} contains only an envelope, then this method delegates to {@link #subgrid(Envelope, double...)}.
      * Otherwise if {@code gridExtent} contains only an extent, then this method delegates to {@link #subgrid(GridExtent, int...)}.
-     * Otherwise the following information are mandatory:
+     * Otherwise the following information are mandatory:</p>
      * <ul>
      *   <li>{@linkplain GridGeometry#getExtent() Extent} in {@code areaOfInterest}.</li>
      *   <li>{@linkplain GridGeometry#getGridToCRS(PixelInCell) Grid to CRS} conversion in {@code areaOfInterest}.</li>
@@ -450,7 +432,24 @@ public class GridDerivation {
      * bilinear interpolations in an image, (s)he will need 1 more pixel on each image border.
      * If the caller wants to apply bi-cubic interpolations, (s)he will need 2 more pixels on each image border.
      *
-     * <p>Notes:</p>
+     * <h4>Usage</h4>
+     * This method can be helpful for implementation of
+     * {@link org.apache.sis.storage.GridCoverageResource#read(GridGeometry, int...)}.
+     * Example:
+     *
+     * {@snippet lang="java" :
+     *     class MyDataStorage extends GridCoverageResource {
+     *         @Override
+     *         public GridCoverage read(GridGeometry domain, int... range) throws DataStoreException {
+     *             GridDerivation change = getGridGeometry().derive().subgrid(domain);
+     *             GridExtent toRead = change.buildExtent();
+     *             int[] subsampling = change.getSubsampling());
+     *             // Do reading here.
+     *         }
+     *     }
+     *     }
+     *
+     * <h4>Notes</h4>
      * <ul>
      *   <li>This method can be invoked only once.</li>
      *   <li>This method cannot be used together with another {@code subgrid(…)} method.</li>
@@ -1055,15 +1054,14 @@ public class GridDerivation {
      * grid coordinates, 1 maps to {@linkplain GridExtent#getHigh(int) high grid coordinates} and 0.5 maps to the median position.
      * The slicing is applied on all dimensions except the specified dimensions to keep.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * given a <var>n</var>-dimensional cube, the following call creates a slice of the two first dimensions
      * (numbered 0 and 1, typically the dimensions of <var>x</var> and <var>y</var> axes)
      * located at the center (ratio 0.5) of all other dimensions (typically <var>z</var> and/or <var>t</var> axes):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     gridGeometry.derive().sliceByRatio(0.5, 0, 1).build();
-     * }
-     * </div>
+     *     }
      *
      * @param  sliceRatio        the ratio to apply on all grid dimensions except the ones to keep.
      * @param  dimensionsToKeep  the grid dimension to keep unchanged.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
index ad7c4d1fe3..3e998d220f 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
@@ -884,31 +884,31 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable
      * This method can be used for getting the grid extent of a <var>s</var>-dimensional slice
      * in a <var>n</var>-dimensional cube where <var>s</var> ≤ <var>n</var>.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * suppose that we want to get a two-dimensional slice <var>(y,z)</var> in a four-dimensional data cube <var>(x,y,z,t)</var>.
      * The first step is to specify the <var>x</var> and <var>t</var> coordinates of the slice.
      * In this example we set <var>x</var> to 5 and <var>t</var> to 8.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     GridGeometry grid = ...;             // Geometry of the (x,y,z,t) grid.
      *     GridGeometry slice4D = grid.slice(new GeneralDirectPosition(5, NaN, NaN, 8));
-     * }
+     *     }
      *
      * Above code created a slice at the requested position, but that slice still have 4 dimensions.
      * It is a "slice" because the <var>x</var> and <var>t</var> dimensions of {@code slice4D} have only one cell.
      * If a two-dimensional slice is desired, then above operations can be completed as below.
      * In this example, the result of {@code getSubspaceDimensions(2)} call will be {1,2}.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     int[]  subDimensions = slice4D.getExtent().getSubspaceDimensions(2);
      *     GridGeometry slice2D = slice4D.reduce(subDimensions);
-     * }
+     *     }
      *
      * Note that in this particular example, it would have been more efficient to execute {@code grid.reduce(1,2)} directly.
      * This {@code getSubspaceDimensions(int)} method is more useful for inferring a {@code slice2D} from a {@code slice4D}
      * which has been created elsewhere, or when we do not really want the {@code slice2D} but only its dimension indices.
-     * </div>
      *
+     * <h4>Number of dimensions</h4>
      * This method returns exactly <var>s</var> indices. If there is more than <var>s</var> dimensions having a
      * {@linkplain #getSize(int) size} greater than 1, then a {@link SubspaceNotSpecifiedException} is thrown.
      * If there is less than <var>s</var> dimensions having a size greater than 1, then the returned list of
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
index f6a3c507de..8a3bee66b2 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
@@ -817,11 +817,11 @@ public class GridGeometry implements LenientComparable, Serializable {
      * The conversion is often an affine transform, but not necessarily.
      * Conversions from cell indices to geospatial coordinates can be performed for example as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     MathTransform  gridToCRS     = gridGeometry.getGridToCRS(PixelInCell.CELL_CENTER);
      *     DirectPosition indicesOfCell = new GeneralDirectPosition(2, 3, 4):
      *     DirectPosition aPixelCenter  = gridToCRS.transform(indicesOfCell, null);
-     * }
+     *     }
      *
      * Callers must specify whether they want the "real world" coordinates of cell center or cell corner.
      * The cell corner is the one for which all grid indices have the smallest values (closest to negative infinity).
@@ -1358,21 +1358,20 @@ public class GridGeometry implements LenientComparable, Serializable {
      * {@code GridDerivation} does not change the state of this {@code GridGeometry} but instead creates
      * new instances as needed. Examples of modifications include clipping to a sub-area or applying a sub-sampling.
      *
-     * <div class="note"><b>Example:</b>
-     * for clipping this grid geometry to a sub-area, one can use:
+     * <p>Each {@code GridDerivation} instance can be used only once and should be used in a single thread.
+     * {@code GridDerivation} preserves the number of dimensions. For example, {@linkplain GridDerivation#slice slicing}
+     * sets the {@linkplain GridExtent#getSize(int) grid size} to 1 in all dimensions specified by a <cite>slice point</cite>,
+     * but does not remove those dimensions from the grid geometry. For dimensionality reduction, see {@link #selectDimensions(int[])}.</p>
+     *
+     * <h4>Example</h4>
+     * For clipping this grid geometry to a sub-area, one can use:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     GridGeometry gg = ...;
      *     Envelope areaOfInterest = ...;
      *     gg = gg.derive().rounding(GridRoundingMode.ENCLOSING)
      *                     .subgrid(areaOfInterest).build();
-     * }
-     * </div>
-     *
-     * Each {@code GridDerivation} instance can be used only once and should be used in a single thread.
-     * {@code GridDerivation} preserves the number of dimensions. For example, {@linkplain GridDerivation#slice slicing}
-     * sets the {@linkplain GridExtent#getSize(int) grid size} to 1 in all dimensions specified by a <cite>slice point</cite>,
-     * but does not remove those dimensions from the grid geometry. For dimensionality reduction, see {@link #selectDimensions(int[])}.
+     *     }
      *
      * @return an object for deriving a grid geometry from {@code this}.
      */
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java
index 337facc853..949b3e4d80 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/ImageRenderer.java
@@ -77,10 +77,10 @@ import static org.apache.sis.image.PlanarImage.GRID_GEOMETRY_KEY;
  * computes automatically the offsets from that position to the position of the first value included
  * in the {@code sliceExtent} given to the constructor.</p>
  *
- * <div class="note"><b>Usage example:</b>
- * {@preformat java
+ * <h2>Usage example</h2>
+ * {@snippet lang="java" :
  *     class MyResource extends GridCoverage {
- *         &#64;Override
+ *         @Override
  *         public RenderedImage render(GridExtent sliceExtent) {
  *             ImageRenderer renderer = new ImageRenderer(this, sliceExtent);
  *             try {
@@ -91,8 +91,7 @@ import static org.apache.sis.image.PlanarImage.GRID_GEOMETRY_KEY;
  *             }
  *         }
  *     }
- * }
- * </div>
+ *     }
  *
  * <h2>Limitations</h2>
  * Current implementation constructs only images made of a single tile.
@@ -612,14 +611,13 @@ public class ImageRenderer {
      * This method should be invoked when the data given to {@code setData(…)} contains only one {@link Vector}, {@link Buffer} or
      * {@link DataBuffer} bank, and the bands in that unique bank are interleaved.
      *
-     * <div class="note"><b>Example:</b>
-     * for an image having three bands named Red (R), Green (G) and Blue (B), if the sample values are stored in a single bank in a
+     * <h4>Example</h4>
+     * For an image having three bands named Red (R), Green (G) and Blue (B), if the sample values are stored in a single bank in a
      * R₀,G₀,B₀, R₁,G₁,B₁, R₂,G₂,B₂, R₃,G₃,B₃, <i>etc.</i> fashion, then this method should be invoked as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     setInterleavedPixelOffsets(3, new int[] {0, 1, 2});
-     * }
-     * </div>
+     *     }
      *
      * @param  pixelStride  the number of data elements between each pixel in the data vector or buffer.
      * @param  bandOffsets  offsets to add to sample index in each band. This is typically {0, 1, 2, …}.
@@ -664,11 +662,10 @@ public class ImageRenderer {
      * This is useful for data with a clear 0 (white) in the middle of the range,
      * with a minimal value equals to the negative of the maximal value.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     setCategoryColors((category) -> category.isQuantitative() ? new Color[] {
-     *         Color.BLUE, Color.CYAN, Color.WHITE, Color.YELLOW, Color.RED
-     *     } : null);
-     * }
+     *             Color.BLUE, Color.CYAN, Color.WHITE, Color.YELLOW, Color.RED} : null);
+     *     }
      *
      * @param colors  the colors to use for each category. The {@code colors} argument cannot be null,
      *                but {@code colors.apply(Category)} can return null.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/IncompleteGridGeometryException.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/IncompleteGridGeometryException.java
index b7b856035f..061f51dc4d 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/IncompleteGridGeometryException.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/IncompleteGridGeometryException.java
@@ -26,13 +26,13 @@ package org.apache.sis.coverage.grid;
  * For example if a process is going to need both the grid extent and the "grid to CRS" transform,
  * than it can verify if those two conditions are met in a single method call:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     if (gg.isDefined(GridGeometry.EXTENT | GridGeometry.GRID_TO_CRS) {
  *         GridExtent    extent    = gg.getGridExtent();
  *         MathTransform gridToCRS = gg.getGridToCRS(PixelInCell.CELL_CENTER);
  *         // Do the process.
  *     }
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 1.0
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/PixelTranslation.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/PixelTranslation.java
index d24b3d7c4c..35b3865d40 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/PixelTranslation.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/PixelTranslation.java
@@ -43,26 +43,27 @@ import org.apache.sis.referencing.operation.transform.MathTransforms;
  * This class provides also a few {@code translate(…)} convenience methods,
  * which apply the translation on a given {@link MathTransform} instance.
  *
- * <div class="note"><b>Example:</b>
- * if the following code snippet, {@code gridToCRS} is an {@link java.awt.geom.AffineTransform} from
+ * <h2>Example</h2>
+ * In the following code snippet, {@code gridToCRS} is an {@link java.awt.geom.AffineTransform} from
  * <cite>grid cell</cite> coordinates (typically pixel coordinates) to some arbitrary CRS coordinates.
  * In this example, the transform maps pixels {@linkplain PixelOrientation#CENTER center},
  * while the {@linkplain PixelOrientation#UPPER_LEFT upper left} corner is desired.
  * This code will switch the affine transform from the <cite>pixel center</cite> to
  * <cite>upper left corner</cite> convention:
  *
- * {@preformat java
- *   final AffineTransform  gridToCRS = ...;
- *   final PixelOrientation current   = PixelOrientation.CENTER;
- *   final PixelOrientation desired   = PixelOrientation.UPPER_LEFT;
+ * {@snippet lang="java" :
+ *     public AffineTransform getGridToPixelCorner() {
+ *         AffineTransform  gridToCRS = ...;
+ *         PixelOrientation current   = PixelOrientation.CENTER;
+ *         PixelOrientation desired   = PixelOrientation.UPPER_LEFT;
  *
- *   // Switch the transform from 'current' to 'desired' convention.
- *   final PixelTranslation source = getPixelTranslation(current);
- *   final PixelTranslation target = getPixelTranslation(desired);
- *   gridToCRS.translate(target.dx - source.dx,
- *                       target.dy - source.dy);
+ *         // Switch the transform from 'current' to 'desired' convention.
+ *         PixelTranslation source = getPixelTranslation(current);
+ *         PixelTranslation target = getPixelTranslation(desired);
+ *         return gridToCRS.translate(target.dx - source.dx,
+ *                                    target.dy - source.dy);
+ *     }
  * }
- * </div>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 1.0
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
index 45742cebb2..d0c635949b 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAttribute.java
@@ -293,11 +293,11 @@ public abstract class AbstractAttribute<V> extends Field<V> implements Attribute
      * <p>If an attribute is known to be a measurement with a characteristic named "accuracy"
      * of type {@link Float}, then the accuracy value could be read as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Float getAccuracy(Attribute<?> measurement) {
      *         Attribute<?> accuracy = measurement.characteristics().get("accuracy");
      *         if (accuracy != null) {
-     *             return (Float) accuracy.getValue(); // Value may be null.
+     *             return (Float) accuracy.getValue();          // Value may be null.
      *         } else {
      *             return (Float) measurement.getType().characteristics().get("accuracy").getDefaultValue();
      *             // A more sophisticated implementation would probably cache the default value somewhere.
@@ -312,30 +312,30 @@ public abstract class AbstractAttribute<V> extends Field<V> implements Attribute
      *     If an older characteristic existed for that name, it will be replaced.
      *     Example:
      *
-     *     {@preformat java
-     *       Attribute<?> accuracy = ...;                               // To be created by the caller.
-     *       characteristics.put("accuracy", accuracy);
-     *     }</li>
+     *     {@snippet lang="java" :
+     *         Attribute<?> accuracy = ...;                               // To be created by the caller.
+     *         characteristics.put("accuracy", accuracy);
+     *         }</li>
      *
      *   <li>Adding the new characteristic to the {@linkplain Map#values() values} collection.
      *     The name is inferred automatically from the characteristic type.
      *     If an older characteristic existed for the same name, an {@link IllegalStateException} will be thrown.
      *     Example:
      *
-     *     {@preformat java
-     *       Attribute<?> accuracy = ...;                               // To be created by the caller.
-     *       characteristics.values().add(accuracy);
-     *     }</li>
+     *     {@snippet lang="java" :
+     *         Attribute<?> accuracy = ...;                               // To be created by the caller.
+     *         characteristics.values().add(accuracy);
+     *         }</li>
      *
      *   <li>Adding the characteristic name to the {@linkplain Map#keySet() key set}.
      *     If no characteristic existed for that name, a default one will be created.
      *     Example:
      *
-     *     {@preformat java
-     *       characteristics.keySet().add("accuracy");                  // Ensure that an entry will exist for that name.
-     *       Attribute<?> accuracy = characteristics.get("accuracy");
-     *       Features.cast(accuracy, Float.class).setValue(...);        // Set new accuracy value here as a float.
-     *     }</li>
+     *     {@snippet lang="java" :
+     *         characteristics.keySet().add("accuracy");                  // Ensure that an entry will exist for that name.
+     *         Attribute<?> accuracy = characteristics.get("accuracy");
+     *         Features.cast(accuracy, Float.class).setValue(...);        // Set new accuracy value here as a float.
+     *         }</li>
      * </ol>
      *
      * @return other attribute types that describes this attribute type, or an empty map if none.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
index a839937e39..d6400cecc2 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
@@ -179,9 +179,9 @@ public abstract class AbstractFeature implements Feature, Serializable {
      *       In other words, the following condition shall hold:</li>
      * </ul>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assert property.getType() == getType().getProperty(property.getName());
-     * }
+     *     }
      *
      * This method is useful for storing non-default {@code Attribute} or {@code FeatureAssociation} implementations
      * in this feature. When default implementations are sufficient, the {@link #setPropertyValue(String, Object)}
@@ -331,10 +331,10 @@ public abstract class AbstractFeature implements Feature, Serializable {
      * casts (e.g. {@code Collection<String>} cannot be checked at runtime.
      * If a type-safe modifiable collection is desired, the following approach can be used instead:
      *
-     * {@preformat java
-     *   Attribute<String> attribute = Features.cast((Attribute<?>) feature.getProperty(name), String.class);
-     *   Collection<String> values = attribute.getValues();    // This collection is guaranteed to be "live".
-     * }
+     * {@snippet lang="java" :
+     *     Attribute<String> attribute = Features.cast((Attribute<?>) feature.getProperty(name), String.class);
+     *     Collection<String> values = attribute.getValues();    // This collection is guaranteed to be "live".
+     *     }
      *
      * @param  name  the property name.
      * @return value of the specified property, or the
@@ -370,13 +370,13 @@ public abstract class AbstractFeature implements Feature, Serializable {
      * Returns the value for the property of the given name if that property exists, or a fallback value otherwise.
      * This method is equivalent to the following code, but potentially more efficient when the property does not exist:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     try {
      *         return getPropertyValue(name);
      *     } catch (PropertyNotFoundException ignore) {
      *         return missingPropertyFallback
      *     }
-     * }
+     *     }
      *
      * Note that if a property of the given name exists but has no value, then this method returns the
      * {@linkplain DefaultAttributeType#getDefaultValue() default value} (which may be {@code null}).
@@ -400,15 +400,17 @@ public abstract class AbstractFeature implements Feature, Serializable {
      * (for example a {@linkplain FeatureOperations#link link} to another property value).
      * Invoking this method is equivalent to performing the following steps:
      *
-     * {@preformat java
-     *     Operation operation = (Operation) type.getProperty(name);
-     *     Property result = operation.apply(this, null);
-     *     if (result instanceof Attribute<?>) {
-     *         return ...;                                      // the attribute value.
-     *     } else if (result instanceof FeatureAssociation) {
-     *         return ...;                                      // the associated feature.
-     *     } else {
-     *         return null;
+     * {@snippet lang="java" :
+     *     public Object getPropertyValue(String name) {
+     *         Operation operation = (Operation) type.getProperty(name);
+     *         Property result = operation.apply(this, null);
+     *         if (result instanceof Attribute<?>) {
+     *             return ...;                                      // the attribute value.
+     *         } else if (result instanceof FeatureAssociation) {
+     *             return ...;                                      // the associated feature.
+     *         } else {
+     *             return null;
+     *         }
      *     }
      * }
      *
@@ -825,13 +827,13 @@ public abstract class AbstractFeature implements Feature, Serializable {
      * for the given feature and returns {@code true} if there is no recursion.
      * This method must be invoked in a {@code try ... finally} block as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (comparisonStart()) try {
      *         // Compare or compute hash code.
      *     } finally {
      *         comparisonEnd();
      *     }
-     * }
+     *     }
      *
      * @return {@code true} if hash code or equality comparison can proceed, or
      *         {@code false} if a recursivity is detected.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java b/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
index 7b3589b78f..4dea55b7af 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
@@ -146,26 +146,25 @@ public class DefaultAssociationRole extends FieldType implements FeatureAssociat
      * This constructor can be used when creating a cyclic graph of {@link DefaultFeatureType} instances.
      * In such cases, at least one association needs to be created while its {@code FeatureType} is not yet available.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * The following establishes a bidirectional association between feature types <var>A</var> and <var>B</var>:
      *
-     * {@preformat java
-     *   String    namespace = "My model";
-     *   GenericName nameOfA = Names.createTypeName(namespace, ":", "Feature type A");
-     *   GenericName nameOfB = Names.createTypeName(namespace, ":", "Feature type B");
-     *   FeatureType typeA = new DefaultFeatureType(nameOfA, false, null,
-     *       new DefaultAssociationRole(Names.createLocalName("Association to B"), nameOfB),
-     *       // More properties if desired.
-     *   );
-     *   FeatureType typeB = new DefaultFeatureType(nameOfB, false, null,
-     *       new DefaultAssociationRole(Names.createLocalName("Association to A"), featureA),
-     *       // More properties if desired.
-     *   );
-     * }
+     * {@snippet lang="java" :
+     *     String    namespace = "My model";
+     *     GenericName nameOfA = Names.createTypeName(namespace, ":", "Feature type A");
+     *     GenericName nameOfB = Names.createTypeName(namespace, ":", "Feature type B");
+     *     FeatureType typeA = new DefaultFeatureType(nameOfA, false, null,
+     *         new DefaultAssociationRole(Names.createLocalName("Association to B"), nameOfB),
+     *         // More properties if desired.
+     *     );
+     *     FeatureType typeB = new DefaultFeatureType(nameOfB, false, null,
+     *         new DefaultAssociationRole(Names.createLocalName("Association to A"), featureA),
+     *         // More properties if desired.
+     *     );
+     *     }
      *
      * After the above code completed, the {@linkplain #getValueType() value type} of <cite>"association to B"</cite>
      * has been automatically set to the {@code typeB} instance.
-     * </div>
      *
      * Callers shall make sure that the feature types graph will not contain more than one feature of the given name.
      * If more than one {@code FeatureType} instance of the given name is found at resolution time, the selected one
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureOperations.java b/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureOperations.java
index 113dcfd216..2e3f2bacfc 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureOperations.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureOperations.java
@@ -126,7 +126,7 @@ public final class FeatureOperations extends Static {
     /**
      * Creates an operation which is only an alias for another property.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * features often have a property that can be used as identifier or primary key.
      * But the name of that property may vary between features of different types.
      * For example, features of type <b>Country</b> may have identifiers named “ISO country code”
@@ -136,13 +136,12 @@ public final class FeatureOperations extends Static {
      * which links to whatever property is used as an identifier in an arbitrary feature.
      * So the definition of the <b>Car</b> feature could contain the following code:
      *
-     * {@preformat java
-     *   AttributeType licensePlateNumber = ...;            // Attribute creation omitted for brevity
-     *   FeatureType car = new DefaultFeatureType(...,      // Arguments omitted for brevity
-     *           licensePlateNumber, model, owner,
-     *           FeatureOperations.link(Map.of(NAME_KEY, "identifier"), licensePlateNumber);
-     * }
-     * </div>
+     * {@snippet lang="java" :
+     *     AttributeType licensePlateNumber = ...;            // Attribute creation omitted for brevity
+     *     FeatureType car = new DefaultFeatureType(...,      // Arguments omitted for brevity
+     *             licensePlateNumber, model, owner,
+     *             FeatureOperations.link(Map.of(NAME_KEY, "identifier"), licensePlateNumber);
+     *     }
      *
      * Since this method does not create new property (it only redirects to an existing property),
      * this method ignores all {@code "result.*"} entries in the given {@code identification} map.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
index 76aad8dd3a..719fd212b4 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
@@ -493,10 +493,10 @@ public final class AttributeTypeBuilder<V> extends PropertyTypeBuilder {
      * Adds another attribute type that describes this attribute type.
      * See <cite>"Attribute characterization"</cite> in {@link DefaultAttributeType} Javadoc for more information.
      *
-     * <p>Usage example:</p>
-     * {@preformat java
+     * <h4>Usage example</h4>
+     * {@snippet lang="java" :
      *     attribute.addCharacteristic(Unit.class).setName("Unit of measurement").setDefaultValue(Units.CELSIUS);
-     * }
+     *     }
      *
      * The default characteristic name is the name of the given type, but callers should invoke one
      * of the {@code CharacteristicTypeBuilder.setName(…)} methods on the returned instance with a better name.
@@ -727,24 +727,23 @@ public final class AttributeTypeBuilder<V> extends PropertyTypeBuilder {
      * If a type has already been built and this builder state has not changed since the type creation,
      * then the previously created {@code AttributeType} instance is returned.
      *
-     * <div class="note"><b>Example:</b>
-     * the following lines of code add a "name" attribute to a "City" feature, then get the corresponding
+     * <h4>Example</h4>
+     * The following lines of code add a "name" attribute to a "City" feature, then get the corresponding
      * {@code AttributeType<String>} instance. If no setter method is invoked on the builder of the "name"
      * attribute after those lines, then the {@code name} variable below will reference the same instance
      * than the "name" attribute in the {@code city} type.
      *
-     * {@preformat java
-     *   FeatureTypeBuilder builder = new FeatureTypeBuilder().setName("City");
-     *   AttributeType<String> name = builder.addAttribute(String.class).setName("name").build();
-     *   FeatureType city = builder.build();
-     *
-     *   assert city.getProperty("name") == name : "AttributeType instance should be the same.";
-     * }
+     * {@snippet lang="java" :
+     *     FeatureTypeBuilder builder = new FeatureTypeBuilder().setName("City");
+     *     AttributeType<String> name = builder.addAttribute(String.class).setName("name").build();
+     *     FeatureType city = builder.build();
+
+     *     assert city.getProperty("name") == name : "AttributeType instance should be the same.";
+     *     }
      *
      * Note that {@code city.getProperty("name")} returns {@code AttributeType<?>},
      * i.e. the {@linkplain #getValueClass() value class} is lost at compile-time.
      * By comparison, this {@code build()} method has a more accurate return type.
-     * </div>
      *
      * @return the attribute type.
      */
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
index 98b969b62e..c00ff567c9 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
@@ -74,15 +74,15 @@ import org.opengis.feature.Operation;
  *
  * The following example creates a city named "Utopia" by default:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     FeatureTypeBuilder builder;
- *
+
  *     // Create a feature type for a city, which contains a name and a population.
  *     builder = new FeatureTypeBuilder() .setName("City");
  *     builder.addAttribute(String.class) .setName("name").setDefaultValue("Utopia");
  *     builder.addAttribute(Integer.class).setName("population");
  *     FeatureType city = builder.build();
- * }
+ *     }
  *
  * A call to {@code System.out.println(city)} prints the following table:
  *
@@ -452,13 +452,13 @@ public class FeatureTypeBuilder extends TypeBuilder {
      * {@link #setName(CharSequence...)} methods; the result of all previous calls stay unmodified.
      * Example:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     FeatureTypeBuilder builder = new FeatureTypeBuilder().setNameSpace("MyNameSpace").setName("City");
      *     FeatureType city = builder.build();
-     *
+
      *     System.out.println(city.getName());                              // Prints "City"
      *     System.out.println(city.getName().toFullyQualifiedName());       // Prints "MyNameSpace:City"
-     * }
+     *     }
      *
      * There is different conventions about the use of name spaces. ISO 19109 suggests that the namespace of all
      * {@code AttributeType} names is the name of the enclosing {@code FeatureType}, but this is not mandatory.
@@ -663,10 +663,10 @@ public class FeatureTypeBuilder extends TypeBuilder {
      * The default attribute name is the name of the given type, but callers should invoke one
      * of the {@code AttributeTypeBuilder.setName(…)} methods on the returned instance with a better name.
      *
-     * <p>Usage example:</p>
-     * {@preformat java
+     * <h4>Usage example</h4>
+     * {@snippet lang="java" :
      *     builder.addAttribute(String.class).setName("City").setDefaultValue("Metropolis");
-     * }
+     *     }
      *
      * The value class cannot be {@code Feature.class} since features shall be handled
      * as {@linkplain #addAssociation(FeatureType) associations} instead of attributes.
@@ -730,11 +730,11 @@ public class FeatureTypeBuilder extends TypeBuilder {
      * The Coordinate Reference System (CRS) uses (<var>longitude</var>, <var>latitude</var>) axes on the WGS 84 datum.
      * Finally that new attribute is declared the feature <em>default</em> geometry:
      *
-     * {@preformat java
-     *   builder.addAttribute(GeometryType.POINT).setName("MyPoint")
-     *          .setCRS(CommonCRS.WGS84.normalizedGeographic())
-     *          .addRole(AttributeRole.DEFAULT_GEOMETRY);
-     * }
+     * {@snippet lang="java" :
+     *     builder.addAttribute(GeometryType.POINT).setName("MyPoint")
+     *            .setCRS(CommonCRS.WGS84.normalizedGeographic())
+     *            .addRole(AttributeRole.DEFAULT_GEOMETRY);
+     *     }
      *
      * If the library in use is JTS or ESRI instead of Java2D,
      * then the {@code Point} class of those libraries will be used instead of {@code Point2D}.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
index ae51b5abbf..d9fc9405f6 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
@@ -64,13 +64,13 @@ import org.opengis.feature.PropertyNotFoundException;
  * qualified name} is requested.
  * Example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     FeatureTypeBuilder builder = new FeatureTypeBuilder().setNameSpace("MyNameSpace").setName("City");
  *     FeatureType city = builder.build();
- *
+
  *     System.out.println(city.getName());                              // Prints "City"
  *     System.out.println(city.getName().toFullyQualifiedName());       // Prints "MyNameSpace:City"
- * }
+ *     }
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/package-info.java b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/package-info.java
index d3e46b7ac5..4762fc9e49 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/builder/package-info.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/builder/package-info.java
@@ -24,7 +24,7 @@
  * The following example creates a feature type for a capital, as a special kind of city,
  * named "Utopia" by default:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     FeatureTypeBuilder builder;
  *
  *     // Create a feature type for a city, which contains a name and a population.
@@ -37,7 +37,7 @@
  *     builder = new FeatureTypeBuilder().setName("Capital").setSuperTypes(city);
  *     builder.addAttribute(String.class).setName("parliament");
  *     FeatureType capital = builder.build();
- * }
+ *     }
  *
  * A call to {@code System.out.println(capital)} prints the following table:
  *
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/Optimization.java b/core/sis-feature/src/main/java/org/apache/sis/filter/Optimization.java
index ffc8e17298..06a5938a4c 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/Optimization.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/Optimization.java
@@ -55,10 +55,10 @@ import org.opengis.feature.FeatureType;
  * This class is <strong>not</strong> thread-safe.
  * A new instance shall be created for each thread applying optimizations. Example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Filter<R> filter = ...;
  *     filter = new Optimization().apply(filter);
- * }
+ *     }
  *
  * <h2>How optimizations are applied</h2>
  * Optimizations are specific to each expression and filter type.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/AnnotatedImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/AnnotatedImage.java
index 99e12cdaa0..3b80130fd4 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/AnnotatedImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/AnnotatedImage.java
@@ -478,7 +478,7 @@ abstract class AnnotatedImage extends ImageAdapter {
      * approach is two define 3 private methods in the subclass as below (where <var>P</var> is the type of the
      * property to compute):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     private P createAccumulator() {
      *         // Create an object holding the information to be computed by a single thread.
      *         // This is invoked for each worker thread before the worker starts its execution.
@@ -494,7 +494,7 @@ abstract class AnnotatedImage extends ImageAdapter {
      *         // The accumulator may already contain data, which need to be augmented (not overwritten).
      *     }
      *
-     *     &#64;Override
+     *     @Override
      *     protected Collector<Raster,P,P> collector() {
      *         return Collector.of(this::createAccumulator, MyClass::compute, MyClass::combine);
      *     }
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/ComputedImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/ComputedImage.java
index baa8a35f32..4c9d5a0643 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/ComputedImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/ComputedImage.java
@@ -531,8 +531,8 @@ public abstract class ComputedImage extends PlanarImage implements Disposable {
      * The returned tile will be automatically cached.
      *
      * <p>A typical implementation is as below:</p>
-     * {@preformat java
-     *     &#64;Override
+     * {@snippet lang="java" :
+     *     @Override
      *     protected Raster computeTile(int tileX, int tileY, WritableRaster tile) {
      *         if (tile == null) {
      *             tile = createTile(tileX, tileY);
@@ -665,24 +665,24 @@ public abstract class ComputedImage extends PlanarImage implements Disposable {
      * This method is provided for subclasses that implement the {@link WritableRenderedImage} interface.
      * This method can be used as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     class MyImage extends ComputedImage implements WritableRenderedImage {
      *         // Constructor omitted for brevity.
      *
-     *         &#64;Override
+     *         @Override
      *         public WritableRaster getWritableTile(int tileX, int tileY) {
      *             WritableRaster raster = ...;             // Get the writable tile here.
      *             markTileWritable(tileX, tileY, true);
      *             return raster;
      *         }
      *
-     *         &#64;Override
+     *         @Override
      *         public void releaseWritableTile(int tileX, int tileY) {
      *             markTileWritable(tileX, tileY, false);
      *             // Release the raster here.
      *         }
      *     }
-     * }
+     *     }
      *
      * @param  tileX    the <var>x</var> index of the tile to acquire or release.
      * @param  tileY    the <var>y</var> index of the tile to acquire or release.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/MaskedImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/MaskedImage.java
index 0b25ef0022..d11a2aa251 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/MaskedImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/MaskedImage.java
@@ -75,13 +75,13 @@ final class MaskedImage extends SourceAlignedImage {
      * The clip after rasterization. Each element contains 8 pixel values.
      * Index of pixel value at coordinate (x,y) can be obtained as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     int xm      = x - maskBounds.x;
      *     int xy      = y - maskBounds.y;
      *     int element = mask[ym*scanlineStride + xm/Byte.SIZE];
      *     int shift   = (Byte.SIZE-1) - (xm & (Byte.SIZE-1));
      *     int pixel   = (element >>> shift) & 1;
-     * }
+     *     }
      *
      * @see #getMask()
      */
@@ -170,13 +170,13 @@ final class MaskedImage extends SourceAlignedImage {
      * After conversion to {@link LongBuffer}, index of pixel value at
      * coordinate (x,y) can be obtained as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     int xm      = x - maskBounds.x;
      *     int xy      = y - maskBounds.y;
      *     int element = mask[ym*scanlineStride + xm/Long.SIZE];
      *     int shift   = (Long.SIZE-1) - (xm & (Long.SIZE-1));
      *     int pixel   = (element >>> shift) & 1;
-     * }
+     *     }
      *
      * <h4>Pre-conditions</h4>
      * The {@link #getMaskTiles()} method must have been invoked at least once before this method.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java b/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java
index 702ec9acd0..5f3b84ad5d 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java
@@ -59,16 +59,15 @@ import static org.apache.sis.internal.util.Numerics.ceilDiv;
  * left to right). Iteration can be performed on a complete image or only a sub-region of it. Some optimized iterator
  * implementations exist for a few commonly used {@linkplain java.awt.image.SampleModel sample models}.
  *
- * <div class="note"><b>Example:</b>
- * {@preformat java
+ * <h2>Example</h2>
+ * {@snippet lang="java" :
  *     PixelIterator it = PixelIterator.create(image);
  *     double[] samples = null;
  *     while (it.next()) {
  *         samples = it.getPixel(samples);      // Get values in all bands.
  *         // Perform computation here...
  *     }
- * }
- * </div>
+ *     }
  *
  * <h2>Default implementation</h2>
  * This base class uses the {@link Raster} API for traversing the pixels in each tile.
@@ -293,11 +292,12 @@ public class PixelIterator {
      * with unspecified iteration order. Users can invoke setter methods for specifying
      * desired behavior for the iterators to create.
      *
-     * <div class="note"><b>Example:</b>
-     * {@preformat java
-     *     PixelIterator iterator = new PixelIterator.Builder().setRegionOfInterest(new Rectangle(10, 10, 5, 5).create(image);
-     * }
-     * </div>
+     * <h2>Example</h2>
+     * {@snippet lang="java" :
+     *     PixelIterator iterator = new PixelIterator.Builder()
+     *             .setRegionOfInterest(new Rectangle(10, 10, 5, 5)
+     *             .create(image);
+     *     }
      */
     public static class Builder {
         /**
@@ -715,15 +715,14 @@ public class PixelIterator {
      * the iterator state is as if the {@link #next()} method has been invoked just before to reach the
      * specified position.
      *
-     * <div class="note"><b>Usage example:</b>
-     * {@preformat java
+     * <h4>Usage example</h4>
+     * {@snippet lang="java" :
      *     iterator.moveTo(x, y);
      *     do {
      *         int sample = iterator.getSample(band);
      *         // Use sample value here...
      *     } while (iterator.next());
-     * }
-     * </div>
+     *     }
      *
      * @param  px  the column index of the pixel to make current.
      * @param  py  the row index of the pixel to make current.
@@ -1116,12 +1115,12 @@ public class PixelIterator {
      * those write operations may change the content of windows at {@linkplain #next() next positions}
      * unless the iteration order of this iterator is {@link SequenceType#LINEAR}.</p>
      *
-     * <div class="note"><b>Usage example:</b>
+     * <h4>Usage example</h4>
      * following code creates an iterator over the full area of given image, then a window of 5×5 pixels.
      * The window is moved over all the image area in iteration order. Inside the window, data are copied
      * in {@linkplain SequenceType#LINEAR linear order} regardless the iteration order.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     PixelIterator it = create(image, null, new Dimension(5, 5), null);     // Windows size will be 5×5 pixels.
      *     PixelIterator<FloatBuffer> window = it.createWindow(TransferType.FLOAT);
      *     FloatBuffer values = window.values;
@@ -1132,8 +1131,7 @@ public class PixelIterator {
      *             // use the sample value here.
      *         }
      *     }
-     * }
-     * </div>
+     *     }
      *
      * @param  <T>   the type of the data buffer to use for transferring data.
      * @param  type  the desired type of values ({@code int}, {@code float} or {@code double}).
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java
index cca4151bfb..88d16a4a9c 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java
@@ -87,7 +87,7 @@ import static java.lang.Math.multiplyFull;
  * {@link WritableRenderedImage#releaseWritableTile releaseWritableTile(…)} methods should be invoked in
  * {@code try ... finally} blocks like below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     WritableRenderedImage image = ...;
  *     WritableRaster tile = image.getWritableTile(tileX, tileY);
  *     try {
@@ -95,7 +95,7 @@ import static java.lang.Math.multiplyFull;
  *     } finally {
  *         image.releaseWritableTile(tileX, tileY);
  *     }
- * }
+ *     }
  *
  * This is recommended because implementations may count the number of acquisitions and releases for deciding
  * when to notify the {@link java.awt.image.TileObserver}s. Some implementations may also acquire and release
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java
index 5dd6999a83..f7fe04e8ed 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java
@@ -316,9 +316,9 @@ public class ResampledImage extends ComputedImage {
      * The return value should be 0 according above contract, but this method returns 0.5 instead.
      * This addition of a 0.5 offset allows the following substitution:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Math.round(x) ≈ (long) Math.floor(x + 0.5)
-     * }
+     *     }
      *
      * {@link Math#round(double)} is the desired behavior for nearest-neighbor interpolation, but the buffer given
      * to {@link Interpolation#interpolate(DoubleBuffer, int, double, double, double[], int)} is filled with values
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/WritablePixelIterator.java b/core/sis-feature/src/main/java/org/apache/sis/image/WritablePixelIterator.java
index 4e7f0ff729..4c954536ed 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/WritablePixelIterator.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/WritablePixelIterator.java
@@ -35,7 +35,7 @@ import org.apache.sis.internal.feature.Resources;
  * <p>Contrarily to {@code PixelIterator}, {@code WritablePixelIterator} needs to be closed after
  * iteration in order to release tiles. Example:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     try (WritablePixelIterator it = WritablePixelIterator.create(image)) {
  *         double[] samples = null;
  *         while (it.next()) {
@@ -44,7 +44,7 @@ import org.apache.sis.internal.feature.Resources;
  *             it.setPixels(sample);                // Replace values in all bands.
  *         }
  *     }
- * }
+ *     }
  *
  * <h2>Casting a {@code PixelIterator}</h2>
  * To check if a {@code PixelIterator} can be used for writing pixels, a {@code … instanceof WritablePixelIterator}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
index fd6f9dfa21..5d7671c344 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
@@ -655,9 +655,9 @@ public final class ColorModelFactory {
      * Returns a bit count for an {@link IndexColorModel} mapping {@code mapSize} colors.
      * It is guaranteed that the following relation is hold:
      *
-     * {@preformat java
-     *     (1 << getBitCount(mapSize)) >= mapSize
-     * }
+     * {@snippet lang="java" :
+     *     assert (1 << getBitCount(mapSize)) >= mapSize;
+     *     }
      *
      * @param  mapSize  the number of colors in the map.
      * @return the number of bits to use.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java
index 326c7ea4a6..80c5b076cb 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java
@@ -112,11 +112,11 @@ public abstract class TiledProcess<R> {
      * which will be overwritten by this method.
      *
      * <p>Usage example:</p>
-     * {@preformat java
+     * {@snippet lang="java" :
      *     TiledProcess process = new TiledProcess<MyResultType>(image, 0, 0,
      *             new PixelIterator.Builder().setIteratorOrder(SequenceType.LINEAR))
      *     {
-     *         &#64;Override
+     *         @Override
      *         protected Task createSubTask() {
      *             return new SubTask();
      *         }
@@ -124,13 +124,13 @@ public abstract class TiledProcess<R> {
      *         private final class SubTask extends Task {
      *             private MyResultType result;
      *
-     *             &#64;Override protected void execute() {result = ...}    // Do calculation in background thread.
-     *             &#64;Override protected void merge(Task neighbor) {...}  // Merge this.result with neighbor.result().
-     *             &#64;Override protected MyResultType result() {return result;}
+     *             @Override protected void execute() {result = ...}    // Do calculation in background thread.
+     *             @Override protected void merge(Task neighbor) {...}  // Merge this.result with neighbor.result().
+     *             @Override protected MyResultType result() {return result;}
      *         }
      *     };
      *     process.execute();
-     * }
+     *     }
      *
      * @param  data             the image on which to iterate over the pixels.
      * @param  overlapX         the number of overlapping pixels between tiles on the <var>x</var> axis.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/isoline/PolylineBuffer.java b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/isoline/PolylineBuffer.java
index dd06a647d8..0c468a016e 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/isoline/PolylineBuffer.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/isoline/PolylineBuffer.java
@@ -106,9 +106,9 @@ final class PolylineBuffer {
      * <p>This method is typically invoked in the following pattern (but this is not mandatory).
      * An important aspect is that {@code this} and {@code other} should be on perpendicular axes:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     interpolateOnBottomSide(polylinesOnTop[x].attach(polylineOnLeft));
-     * }
+     *     }
      *
      * @return {@code this} for method calls chaining.
      */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java
index 70da9bf553..7a803659bd 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java
@@ -50,9 +50,9 @@ public interface AdapterReplacement {
      * Invoked when a new adapter is created by {@link org.apache.sis.xml.MarshallerPool}.
      * Typical implementations will be as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     marshaller.setAdapter(MyParent.class, this);
-     * }
+     *     }
      *
      * @param  marshaller The marshaller to be configured.
      * @throws JAXBException if the given marshaller cannot be configured.
@@ -63,9 +63,9 @@ public interface AdapterReplacement {
      * Invoked when a new adapter is created by {@link org.apache.sis.xml.MarshallerPool}.
      * Typical implementations will be as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     unmarshaller.setAdapter(MyParent.class, this);
-     * }
+     *     }
      *
      * @param  unmarshaller The unmarshaller to be configured.
      * @throws JAXBException if the given unmarshaller cannot be configured.
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 034d1bb592..ffce49e72f 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
@@ -204,14 +204,14 @@ public final class Context extends MarshalContext {
      * Invoked when a marshalling or unmarshalling process is about to begin.
      * Must be followed by a call to {@link #finish()} in a {@code finally} block.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Context context = new Context(…);
      *     try {
      *         ...
      *     } finally {
      *         context.finish();
      *     }
-     * }
+     *     }
      *
      * @param  bitMasks         a combination of {@link #MARSHALLING}, {@code SUBSTITUTE_*} or other bit masks.
      * @param  locale           the locale, or {@code null} if unspecified.
@@ -332,7 +332,7 @@ public final class Context extends MarshalContext {
      * when marshalling object that need to marshal their children in a different
      * locale, like below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     private void beforeMarshal(Marshaller marshaller) {
      *         Context.push(language);
      *     }
@@ -439,12 +439,12 @@ public final class Context extends MarshalContext {
      * or {@code null} if this information is not provided. The {@code <gml:*PropertyType>} element can contains
      * information not found in {@code <gml:*Type>} objects like XLink or UUID.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * before unmarshalling the {@code <gml:OperationParameter>} (upper case {@code O}) element below,
      * {@code wrapper} will be set to the temporary object representing {@code <gml:operationParameter>}.
      * That adapter provides important information for the SIS {@code <gml:OperationParameter>} constructor.
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:ParameterValue>
      *     <gml:valueFile>http://www.opengis.org</gml:valueFile>
      *     <gml:operationParameter>
@@ -453,8 +453,9 @@ public final class Context extends MarshalContext {
      *       </gml:OperationParameter>
      *     </gml:operationParameter>
      *   </gml:ParameterValue>
-     * }</div>
+     *   }
      *
+     * <h4>Design note</h4>
      * For performance reasons, this {@code wrapper} information is not provided by default.
      * See {@link #setWrapper(Context, PropertyType)} for more information.
      *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
index 617d63de5a..7a65d3dee4 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
@@ -53,11 +53,11 @@ import org.apache.sis.xml.IdentifierSpace;
  * In the current SIS library, there is different places where identifiers are filtered on the
  * basis of this class, as below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     if (identifier.getAuthority() instanceof NonMarshalledAuthority<?>) {
  *         // Omit that identifier.
  *     }
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListAdapter.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListAdapter.java
index 334fea70b3..ccb56b90cc 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListAdapter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/CodeListAdapter.java
@@ -28,7 +28,7 @@ import org.apache.sis.internal.jaxb.FilterByVersion;
  * This object wraps a {@link CodeListUID}, which contain {@link CodeListUID#codeList codeList}
  * and {@link CodeListUID#codeListValue codeListValue} attributes. The result looks like below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <dateType>
  *     <CI_DateTypeCode codeList="../Codelist/ML_gmxCodelists.xml#CI_DateTypeCode" codeListValue="revision" codeSpace="fra">
  *       révision
@@ -76,9 +76,9 @@ public abstract class CodeListAdapter<ValueType extends CodeListAdapter<ValueTyp
      * Wraps the given value.
      * Most implementations will be like below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return new ValueType(value);
-     * }
+     *     }
      *
      * However, is some cases, the {@code value} argument may be inspected.
      * For example, {@link org.apache.sis.internal.jaxb.code.MD_RestrictionCode}
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 6a2ca57d21..c4a05ac983 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
@@ -46,11 +46,11 @@ import static org.apache.sis.internal.metadata.ImplementationHelper.ISO_NAMESPAC
  * require {@code "https"} protocol, but the URLs in this class use {@code "http"} for historical reasons).
  * Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gmi:MI_SensorTypeCode
  *       codeList="http://standards.iso.org/…snip…/codelists.xml#CI_SensorTypeCode"
  *       codeListValue="RADIOMETER">Radiometer</gmi:MI_SensorTypeCode>
- * }
+ *   }
  *
  * <p>Constants in this class are organized in three groups:</p>
  * <ul>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/EnumAdapter.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/EnumAdapter.java
index 5a4a4af558..4f6614e1f1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/EnumAdapter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/cat/EnumAdapter.java
@@ -27,7 +27,7 @@ import org.opengis.util.ControlledVocabulary;
  * An adapter for {@link Enum}, in order to implement the ISO 19115-3 standard.
  * Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <srv:direction>
  *     <srv:SV_ParameterDirection>in</srv:SV_ParameterDirection>
  *   </srv:direction>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java
index 072caaf562..de55bacba1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_GenericName.java
@@ -100,7 +100,7 @@ public class GO_GenericName extends XmlAdapter<GO_GenericName, GenericName> {
      * is a {@link TypeName} or a {@link MemberName}, in order to use {@link #getName()} instead.
      * Example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:alias>
      *     <gco:LocalName codeSpace=\"A code space\">A name in a scope</gco:LocalName>
      *   </gml:alias>
@@ -135,7 +135,7 @@ public class GO_GenericName extends XmlAdapter<GO_GenericName, GenericName> {
      * is a {@link LocalName} or {@link ScopedName}, in order to use {@link #getValue()} instead.
      * Example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:alias>
      *     <gco:TypeName>
      *       <gco:aName>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_URL.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_URL.java
index 2db49f7824..d0f580f6a6 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_URL.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/GO_URL.java
@@ -24,7 +24,7 @@ import javax.xml.bind.annotation.XmlValue;
  * This type was used by legacy XML format inside {@code <gmd:CI_OnlineResource>}, but has
  * been replaced by {@code <gcx:FileName>} in newer ISO 19115-3:2016 standard. Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gmd:linkage>
  *      <gmd:URL>https://tools.ietf.org/html/rfc1149</gmd:URL>
  *   </gmd:linkage>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/Multiplicity.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/Multiplicity.java
index df80e51c7e..930ac871ff 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/Multiplicity.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/Multiplicity.java
@@ -30,7 +30,7 @@ import org.apache.sis.measure.NumberRange;
  * The possible cardinality of a relation. Represented by a set of simple multiplicity ranges.
  * Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gco:Multiplicity>
  *     <gco:range>
  *       <gco:MultiplicityRange>
@@ -43,7 +43,7 @@ import org.apache.sis.measure.NumberRange;
  *       </gco:MultiplicityRange>
  *     </gco:range>
  *   </gco:Multiplicity>
- * }
+ *   }
  *
  * @author  Guilhem Legal (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/NameValue.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/NameValue.java
index 9528bc2837..eb48b55536 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/NameValue.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/NameValue.java
@@ -31,7 +31,7 @@ import org.apache.sis.xml.Namespaces;
  * A generalized type to be used for a term, keyword or name.
  * The following schema fragment specifies the expected content contained within this class.
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <complexType name="CodeType">
  *     <simpleContent>
  *       <extension base="<http://www.w3.org/2001/XMLSchema>string">
@@ -39,7 +39,7 @@ import org.apache.sis.xml.Namespaces;
  *       </extension>
  *     </simpleContent>
  *   </complexType>
- * }
+ *   }
  *
  * {@code NameValue}s are used for:
  *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
index 2d44e99145..4a0c89974e 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/ObjectReference.java
@@ -128,7 +128,7 @@ final class ObjectReference {
      * Adds a new identifier into the given map, if non null. No previous value should exist in normal situation.
      * However, a previous value may exit in unusual (probably not very valid) XML, as in the following example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <cit:CI_Citation>
      *     <cit:series uuidref="f8f5fcb1-d57b-4013-b3a4-4eaa40df6dcf">
      *       <cit:CI_Series uuid="f8f5fcb1-d57b-4013-b3a4-4eaa40df6dcf">
@@ -136,7 +136,7 @@ final class ObjectReference {
      *       </cit:CI_Series>
      *     </cit:series>
      *   </cit:CI_Citation>
-     * }
+     *   }
      *
      * In such situation, this method is silent if the two identifiers are equal, or logs a warning and restores
      * the previous value if they are not equal. The previous value is the "{@code uuid}" attribute, which is
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
index 6ea35ef970..43477c603d 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
@@ -44,7 +44,7 @@ import org.apache.sis.util.resources.Errors;
  * the value to be marshalled. Wrappers exist because ISO 19139 have the strange
  * habit to wrap every properties in an extra level, for example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <CI_ResponsibleParty>
  *     <contactInfo>
  *       <CI_Contact>
@@ -52,7 +52,7 @@ import org.apache.sis.util.resources.Errors;
  *       </CI_Contact>
  *     </contactInfo>
  *   </CI_ResponsibleParty>
- * }
+ *   }
  *
  * The {@code <CI_Contact>} level is not really necessary, and JAXB is not designed for inserting
  * such level since it is not the usual way to write XML. In order to get this output with JAXB,
@@ -73,17 +73,17 @@ import org.apache.sis.util.resources.Errors;
  * This method will be systematically called at marshalling time by JAXB. Typical implementation
  * ({@code BoundType} and {@code ValueType} need to be replaced by the concrete class):
  *
- * {@preformat java
- *   &#64;XmlElementRef
- *   public BoundType getElement() {
- *       if (skip()) return null;
- *       final ValueType metadata = this.metadata;
- *       return (metadata instanceof BoundType) ? (BoundType) metadata : new BoundType(metadata);
- *   }
+ * {@snippet lang="java" :
+ *     @XmlElementRef
+ *     public BoundType getElement() {
+ *         if (skip()) return null;
+ *         final ValueType metadata = this.metadata;
+ *         return (metadata instanceof BoundType) ? (BoundType) metadata : new BoundType(metadata);
+ *     }
  *
- *   public void getElement(final BoundType metadata) {
- *       this.metadata = metadata;
- *   }
+ *     public void getElement(final BoundType metadata) {
+ *         this.metadata = metadata;
+ *     }
  * }
  *
  * The actual implementation may be slightly more complicated than the above if there is
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java
index 5a20f033b1..eb4abe596f 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gco/package-info.java
@@ -65,7 +65,7 @@
  *
  * <p>Those two kinds of types are marshalled as below:</p>
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <MD_MetaData>
  *     <property uuidref="…">
  *       <Foo_Type uuid="…">
@@ -73,7 +73,7 @@
  *       </Foo_Type>
  *     </property>
  *   </MD_MetaData>
- * }
+ *   }
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/FileName.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/FileName.java
index ea96ac25e2..6f1154db17 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/FileName.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/FileName.java
@@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlRootElement;
  * This is used for the URI in {@link org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic}.
  * Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <fileName>
  *      <gcx:FileName src="../path/wkj98723.jpg">Overview</gcx:FileName>
  *   </fileName>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/MimeFileType.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/MimeFileType.java
index 14bbc9f382..2fd771b1bc 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/MimeFileType.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gcx/MimeFileType.java
@@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlRootElement;
  * This is used in {@link org.apache.sis.metadata.iso.identification.DefaultBrowseGraphic}.
  * Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <fileType>
  *     <gcx:MimeFileType type="image/tiff">Graphic TIFF</gcx:MimeFileType>
  *   </fileType>
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 5837a06d9b..6513dbef9e 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
@@ -31,9 +31,9 @@ import org.apache.sis.internal.xml.XmlUtilities;
  *
  * <p>Using this adapter is equivalent to apply the following annotation on a {@code Date} field:</p>
  *
- * {@preformat java
- *     &#64;XmlElement
- *     &#64;XmlSchemaType(name="date")
+ * {@snippet lang="java" :
+ *     @XmlElement
+ *     @XmlSchemaType(name="date")
  *     private Date realizationEpoch;
  * }
  *
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 877503c1a3..ec1c332203 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
@@ -47,7 +47,7 @@ import org.apache.sis.measure.Units;
  * The former expresses some measurements with an object of XML type {@code gco:Distance}
  * (as a substitution for XML type {@code gco:Measure}):
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <mri:distance>
  *     <gco:Distance uom="http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])">1000.0</gco:Distance>
  *   </mri:distance>
@@ -55,7 +55,7 @@ import org.apache.sis.measure.Units;
  *
  * while GML will rather use a a syntax like below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gml:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">6378137</gml:semiMajorAxis>
  * }
  *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
index ae151eef58..c382e5d548 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/SC_VerticalCRS.java
@@ -35,19 +35,19 @@ import org.apache.sis.util.Classes;
  * implementation returning {@code null}. Modules capable to provide an instance shall create
  * a subclass like below:</p>
  *
- * {@preformat java
- *     public final class MyClass extends SC_VerticalCRS implements AdapterReplacement {
- *         &#64;Override
- *         public void register(final Marshaller marshaller) {
- *             marshaller.setAdapter(SC_VerticalCRS.class, this);
- *         }
+ * {@snippet lang="java" :
+ * public final class MyClass extends SC_VerticalCRS implements AdapterReplacement {
+ *     @Override
+ *     public void register(final Marshaller marshaller) {
+ *         marshaller.setAdapter(SC_VerticalCRS.class, this);
+ *     }
  *
- *         &#64;Override
- *         public DefaultVerticalCRS getElement() {
- *             return skip() ? null : DefaultVerticalCRS.castOrCopy(metadata);
- *         }
+ *     @Override
+ *     public DefaultVerticalCRS getElement() {
+ *         return skip() ? null : DefaultVerticalCRS.castOrCopy(metadata);
  *     }
  * }
+ * }
  *
  * Next, the module shall provides the following:
  * <ul>
@@ -110,9 +110,9 @@ public class SC_VerticalCRS extends PropertyType<SC_VerticalCRS, VerticalCRS> {
      * The default implementation returns {@code null}. Subclasses shall override
      * this method like below:
      *
-     * {@preformat java
-     *   return skip() ? null : DefaultVerticalCRS.castOrCopy(metadata);
-     * }
+     * {@snippet lang="java" :
+     *     return skip() ? null : DefaultVerticalCRS.castOrCopy(metadata);
+     *     }
      *
      * @return the metadata to be marshalled.
      */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriodBound.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriodBound.java
index 6774f3c92e..b8a79a898c 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriodBound.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/TimePeriodBound.java
@@ -63,12 +63,12 @@ public abstract class TimePeriodBound {
      * The begin or end position in a {@link TimePeriod}, expressed in the GML 3 way.
      * Example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:TimePeriod>
      *     <gml:beginPosition>1992-01-01T01:00:00.000+01:00</gml:beginPosition>
      *     <gml:endPosition>2007-12-31T01:00:00.000+01:00</gml:endPosition>
      *   </gml:TimePeriod>
-     * }
+     *   }
      */
     public static final class GML3 extends TimePeriodBound {
         /**
@@ -123,7 +123,7 @@ public abstract class TimePeriodBound {
      * element inside a GML 2 {@link TimePeriod} in GML 2. This is not used for GML 3.
      * Example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:TimePeriod>
      *     <gml:begin>
      *       <gml:TimeInstant gml:id="begin">
@@ -136,7 +136,7 @@ public abstract class TimePeriodBound {
      *       </gml:TimeInstant>
      *     </gml:end>
      *   </gml:TimePeriod>
-     * }
+     *   }
      */
     //@XmlType(name = "TimeInstantPropertyType") // TODO: Omitted for now for allowing external modules to define their own type.
     public static final class GML2 extends TimePeriodBound {
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 f38c840d26..6ce06f91f7 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
@@ -37,7 +37,7 @@ import org.apache.sis.util.resources.Errors;
  *
  * <p>This adapter formats the locale like below:</p>
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <cit:country>
  *     <lan:Country codeList="http://(...snip...)" codeListValue="FR">France</lan:Country>
  *   </cit:country>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java
index 50a46358db..7117619b87 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LanguageCode.java
@@ -32,7 +32,7 @@ import org.apache.sis.internal.jaxb.gco.CharSequenceAdapter;
  *
  * <p>This adapter formats the locale like below (by {@link LocaleAdapter}):</p>
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gmd:language>
  *     <gmd:LanguageCode codeList="http://(...snip...)" codeListValue="eng">English</gmd:LanguageCode>
  *   </gmd:language>
@@ -40,13 +40,13 @@ import org.apache.sis.internal.jaxb.gco.CharSequenceAdapter;
  *
  * or (when using {@link PT_Locale} adapter):
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <lan:PT_Locale>
  *     <lan:language>
  *       <lan:LanguageCode codeList="http://(...snip...)" codeListValue="eng">English</lan:LanguageCode>
  *     </lan:language>
  *   </lan:PT_Locale>
- * }
+ *   }
  *
  * Note that {@code <gco:CharacterString>} can be substituted to the language code.
  *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java
index 71b5b849fd..6d39973fd1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/LocaleAdapter.java
@@ -25,7 +25,7 @@ import org.apache.sis.internal.jaxb.Context;
  * JAXB adapter for XML {@code <GO_CharacterString>} or {@code <LanguageCode>} elements
  * mapped to {@link Locale}. This adapter formats the locale like below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gmd:language>
  *     <gmd:LanguageCode codeList="(snip)#LanguageCode" codeListValue="jpn">Japanese</gmd:LanguageCode>
  *   </gmd:language>
@@ -83,7 +83,7 @@ public final class LocaleAdapter extends XmlAdapter<LanguageCode, Locale> {
      * JAXB adapter for XML {@code <PT_Locale>} elements mapped to {@link Locale}.
      * This adapter formats the locale like below:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gmd:locale>
      *     <gmd:PT_Locale>
      *       <gmd:language>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_FreeText.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_FreeText.java
index 6b5c0c0233..9e9a8ea2b2 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_FreeText.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/PT_FreeText.java
@@ -35,7 +35,7 @@ import org.apache.sis.util.ArraysExt;
  * It will be used in order to marshal and unmarshal international strings localized in several language,
  * using the {@link DefaultInternationalString} implementation class. Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <cit:title xsi:type="lan:PT_FreeText_PropertyType">
  *     <gco:CharacterString>Some title in english is present in this node</gco:CharacterString>
  *     <lan:PT_FreeText>
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 055abe0401..7c192f3210 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
@@ -39,7 +39,7 @@ import org.apache.sis.internal.util.CollectionsExt;
  * See package documentation for more information about the handling of {@code CodeList} in ISO 19115-3.
  * This wrapper formats the locale like below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <lan:locale>
  *     <lan:PT_Locale id="locale-eng">
  *       <lan:language>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/TextGroup.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/TextGroup.java
index 91fbb4d3bc..d1c218f6d9 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/TextGroup.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/lan/TextGroup.java
@@ -37,7 +37,7 @@ import javax.xml.bind.annotation.XmlElement;
  * languages. SIS uses the ISO 19139:2007 compliant form for marshalling, but accepts both forms
  * during unmarshalling. More specifically, the name suggests that the format should be:</p>
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gco:CharacterString>Apache SIS, projet OpenSource</gco:CharacterString>
  *   <lan:PT_FreeText>
  *     <lan:textGroup>
@@ -50,7 +50,7 @@ import javax.xml.bind.annotation.XmlElement;
  *
  * But the actual official format is:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gco:CharacterString>Apache SIS, projet OpenSource</gco:CharacterString>
  *   <lan:PT_FreeText>
  *     <lan:textGroup>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/package-info.java
index 901cb16940..87b1e42502 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/package-info.java
@@ -21,7 +21,7 @@
  * JAXB cannot marshal directly interfaces), and wrappers around the value to be marshalled.
  * ISO 19139 have the strange habit to wrap every properties in an extra level, for example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <CI_ResponsibleParty>
  *     <contactInfo>
  *       <CI_Contact>
@@ -29,7 +29,7 @@
  *       </CI_Contact>
  *     </contactInfo>
  *   </CI_ResponsibleParty>
- * }
+ *   }
  *
  * The {@code </CI_Contact>} level is not really necessary, and JAXB is not designed for inserting
  * such level since it is not the usual way to write XML. In order to get this output with JAXB, we
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/RS_Identifier.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/RS_Identifier.java
index 240a6b5a12..4e1ea95d7f 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/RS_Identifier.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/RS_Identifier.java
@@ -28,7 +28,7 @@ import org.apache.sis.internal.xml.LegacyNamespaces;
  * Identifier using {@code <gmd:RS_Identifier>} XML element name.
  * This is used for (un)marshalling legacy metadata only. Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gmd:RS_Identifier>
  *     <gmd:authority>
  *       <gmd:CI_Citation>
@@ -41,7 +41,7 @@ import org.apache.sis.internal.xml.LegacyNamespaces;
  *       <gco:CharacterString>4326</gco:CharacterString>
  *     </gmd:code>
  *   </gmd:RS_Identifier>
- * }
+ *   }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
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 2a98a1a86b..dc3fd6055e 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
@@ -81,7 +81,7 @@ public final class ServiceParameter extends Parameter {
      * element as it does for all other attributes) while in ISO 19139:2007 it was not (i.e. name attributes
      * like {@code <gco:aName>} were marshalled directly, without wrapper). Example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <srv:name>
      *     <gco:MemberName>
      *       <gco:aName>
@@ -250,7 +250,7 @@ public final class ServiceParameter extends Parameter {
     /**
      * Returns the name to be marshalled in the ISO 19139:2007 way. Example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <srv:name>
      *     <gco:aName>
      *       <gco:CharacterString>A parameter name</gco:CharacterString>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java
index e08fdb9676..be05b9ec0c 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLBuilder.java
@@ -293,9 +293,9 @@ public class SQLBuilder extends Syntax {
      * Returns a SQL statement for adding a column in a table.
      * The returned statement is of the form:
      *
-     * {@preformat sql
-     *   ALTER TABLE "schema"."table" ADD COLUMN "column" type
-     * }
+     * {@snippet lang="sql" :
+     *     ALTER TABLE "schema"."table" ADD COLUMN "column" type
+     *     }
      *
      * where {@code type} is some SQL keyword like {@code INTEGER} or {@code VARCHAR}
      * depending on the {@code type} argument.
@@ -325,10 +325,10 @@ public class SQLBuilder extends Syntax {
      * Returns a SQL statement for creating a foreigner key constraint.
      * The returned statement is of the form:
      *
-     * {@preformat sql
-     *   ALTER TABLE "schema"."table" ADD CONSTRAINT "table_column_fkey" FOREIGN KEY("column")
-     *   REFERENCES "schema"."target" (primaryKey) ON UPDATE CASCADE ON DELETE RESTRICT
-     * }
+     * {@snippet lang="sql" :
+     *     ALTER TABLE "schema"."table" ADD CONSTRAINT "table_column_fkey" FOREIGN KEY("column")
+     *     REFERENCES "schema"."target" (primaryKey) ON UPDATE CASCADE ON DELETE RESTRICT
+     *     }
      *
      * Note that the primary key is <strong>not</strong> quoted on intent.
      * If quoted are desired, then they must be added explicitly before to call this method.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java
index eeba575e5b..02b572d079 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/SQLUtilities.java
@@ -185,10 +185,10 @@ public final class SQLUtilities extends Static {
      * Workaround for what seems to be a Derby 10.11 bug, which seems to behave as if the LIKE pattern
      * had a trailing % wildcard. This can be verified with the following query on the EPSG database:
      *
-     * {@preformat sql
-     *   SELECT COORD_REF_SYS_CODE, COORD_REF_SYS_NAME FROM EPSG."Coordinate Reference System"
-     *    WHERE COORD_REF_SYS_NAME LIKE 'NTF%Paris%Lambert%zone%I'
-     * }
+     * {@snippet lang="sql" :
+     *     SELECT COORD_REF_SYS_CODE, COORD_REF_SYS_NAME FROM EPSG."Coordinate Reference System"
+     *      WHERE COORD_REF_SYS_NAME LIKE 'NTF%Paris%Lambert%zone%I'
+     *     }
      *
      * which returns "NTF (Paris) / Lambert zone I" as expected but also zones II and III.
      *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java
index 13a6370932..3d4faa153e 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ScriptRunner.java
@@ -120,10 +120,10 @@ public class ScriptRunner implements AutoCloseable {
      * {@code true} if the database supports enums.
      * Example:
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     CREATE TYPE metadata."CI_DateTypeCode" AS ENUM ('creation', 'publication');
      *     CREATE CAST (VARCHAR AS metadata."CI_DateTypeCode") WITH INOUT AS ASSIGNMENT;
-     * }
+     *     }
      *
      * <p>Notes per database product:</p>
      * <ul>
@@ -151,9 +151,9 @@ public class ScriptRunner implements AutoCloseable {
      * Read-only permissions are typically granted to {@link #PUBLIC}.
      * Example:
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     GRANT USAGE ON SCHEMA metadata TO PUBLIC;
-     * }
+     *     }
      *
      * @see #statementsToSkip
      */
@@ -164,9 +164,9 @@ public class ScriptRunner implements AutoCloseable {
      * Read-only permissions are typically granted to {@link #PUBLIC}.
      * Example:
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     GRANT SELECT ON TABLE epsg_coordinatereferencesystem TO PUBLIC;
-     * }
+     *     }
      *
      * @see #statementsToSkip
      */
@@ -176,9 +176,9 @@ public class ScriptRunner implements AutoCloseable {
      * {@code true} if the database supports the {@code COMMENT} statement.
      * Example:
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     COMMENT ON SCHEMA metadata IS 'ISO 19115 metadata';
-     * }
+     *     }
      *
      * @see #statementsToSkip
      */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/package-info.java
index cca641c481..3dd241fe85 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/package-info.java
@@ -42,7 +42,7 @@
  *   </li>
  *
  *   <li><p>Declare the JNDI name in application {@code WEB-INF/web.xml} file:</p>
- *     {@preformat xml
+ *     {@snippet lang="xml" :
  *       <resource-ref>
  *         <description>EPSG dataset and other metadata used by Apache SIS.</description>
  *         <res-ref-name>jdbc/SpatialMetadata</res-ref-name>
@@ -54,7 +54,7 @@
  *
  *   <li><p>Configure the data source in {@code $CATALINA_HOME/conf/context.xml} or in application
  *     {@code META-INF/context.xml} file (change attribute values as needed for the chosen JDBC driver):</p>
- *     {@preformat xml
+ *     {@snippet lang="xml" :
  *       <Context crossContext="true">
  *         <WatchedResource>WEB-INF/web.xml</WatchedResource>
  *         <Resource name            = "jdbc/SpatialMetadata"
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
index a3435c1c8d..8e2bdf2155 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/AbstractMetadata.java
@@ -177,11 +177,13 @@ public abstract class AbstractMetadata implements LenientComparable, Emptiable {
      * such collection.
      *
      * <h4>Default implementation</h4>
-     * The default implementation is equivalent to the following method call:
+     * The default implementation is equivalent to the following:
      *
-     * {@preformat java
-     *   return getStandard().asValueMap(this, null, KeyNamePolicy.JAVABEANS_PROPERTY, ValueExistencePolicy.NON_EMPTY);
-     * }
+     * {@snippet lang="java" :
+     *     return getStandard().asValueMap(this, null,
+     *             KeyNamePolicy.JAVABEANS_PROPERTY,
+     *             ValueExistencePolicy.NON_EMPTY);
+     *     }
      *
      * @return a view of this metadata object as a map.
      *
@@ -238,23 +240,23 @@ public abstract class AbstractMetadata implements LenientComparable, Emptiable {
      * to have their {@code IDENTIFIER} set before any other operation. For example, the following code
      * adds a title to a citation:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     TreeTable.Node node = ...;                               // The node for a DefaultCitation.
      *     TreeTable.Node child = node.newChild();
      *     child.setValue(TableColumn.IDENTIFIER, "title");
      *     child.setValue(TableColumn.VALUE, "Le petit prince");
      *     // Nothing else to do - the child node has been added.
-     * }
+     *     }
      *
      * Nodes can be removed by invoking the {@link java.util.Iterator#remove()} method on the
      * {@linkplain org.apache.sis.util.collection.TreeTable.Node#getChildren() children} iterator.
      *
      * <h4>Default implementation</h4>
-     * The default implementation is equivalent to the following method call:
+     * The default implementation is equivalent to the following:
      *
-     * {@preformat java
-     *   return getStandard().asTreeTable(this, null, ValueExistencePolicy.COMPACT);
-     * }
+     * {@snippet lang="java" :
+     *     return getStandard().asTreeTable(this, null, ValueExistencePolicy.COMPACT);
+     *     }
      *
      * @return a tree table representation of the specified metadata.
      *
@@ -283,7 +285,7 @@ public abstract class AbstractMetadata implements LenientComparable, Emptiable {
      * Performs a {@linkplain ComparisonMode#STRICT strict} comparison of this metadata with
      * the given object. This method is implemented as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     public final boolean equals(final Object object) {
      *         return equals(object, ComparisonMode.STRICT);
      *     }
@@ -323,9 +325,9 @@ public abstract class AbstractMetadata implements LenientComparable, Emptiable {
      * Returns a string representation of this metadata.
      * The default implementation is as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return asTreeTable().toString();
-     * }
+     *     }
      *
      * Note that this make extensive use of Unicode characters
      * and is better rendered with a monospaced font.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
index 88a2d59c1f..b0ba36832a 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/MetadataStandard.java
@@ -687,16 +687,15 @@ public class MetadataStandard implements Serializable {
      * {@linkplain KeyNamePolicy#METHOD_NAME method names} or {@linkplain KeyNamePolicy#SENTENCE
      * sentences} (usually in English).
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * The following code prints <code>"alternateTitle<u>s</u>"</code> (note the plural):
      *
-     * {@preformat java
-     *   MetadataStandard standard = MetadataStandard.ISO_19115;
-     *   Map<String, String> names = standard.asNameMap(Citation.class, UML_IDENTIFIER, JAVABEANS_PROPERTY);
-     *   String value = names.get("alternateTitle");
-     *   System.out.println(value);                   // alternateTitles
-     * }
-     * </div>
+     * {@snippet lang="java" :
+     *     MetadataStandard standard = MetadataStandard.ISO_19115;
+     *     Map<String, String> names = standard.asNameMap(Citation.class, UML_IDENTIFIER, JAVABEANS_PROPERTY);
+     *     String value = names.get("alternateTitle");
+     *     System.out.println(value);                   // alternateTitles
+     *     }
      *
      * The {@code keyPolicy} argument specify only the string representation of keys returned by the iterators.
      * No matter the key name policy, the {@code key} argument given to any {@link Map} method can be any of the
@@ -725,16 +724,15 @@ public class MetadataStandard implements Serializable {
      * {@linkplain TypeValuePolicy#ELEMENT_TYPE element type} or the
      * {@linkplain TypeValuePolicy#DECLARING_INTERFACE declaring interface} among others.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * the following code prints the {@link org.opengis.util.InternationalString} class name:
      *
-     * {@preformat java
-     *   MetadataStandard  standard = MetadataStandard.ISO_19115;
-     *   Map<String,Class<?>> types = standard.asTypeMap(Citation.class, UML_IDENTIFIER, ELEMENT_TYPE);
-     *   Class<?> value = types.get("alternateTitle");
-     *   System.out.println(value);                       // class org.opengis.util.InternationalString
-     * }
-     * </div>
+     * {@snippet lang="java" :
+     *     MetadataStandard  standard = MetadataStandard.ISO_19115;
+     *     Map<String,Class<?>> types = standard.asTypeMap(Citation.class, UML_IDENTIFIER, ELEMENT_TYPE);
+     *     Class<?> value = types.get("alternateTitle");
+     *     System.out.println(value);                       // class org.opengis.util.InternationalString
+     *     }
      *
      * @param  type         the interface or implementation class of a metadata.
      * @param  keyPolicy    determines the string representation of map keys.
@@ -939,13 +937,13 @@ public class MetadataStandard implements Serializable {
      * to have their {@code IDENTIFIER} set before any other operation. For example, the following code
      * adds a title to a citation:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     TreeTable.Node node = ...;                               // The node for a DefaultCitation.
      *     TreeTable.Node child = node.newChild();
      *     child.setValue(TableColumn.IDENTIFIER, "title");
      *     child.setValue(TableColumn.VALUE, "Le petit prince");
      *     // Nothing else to do - the child node has been added.
-     * }
+     *     }
      *
      * Nodes can be removed by invoking the {@link java.util.Iterator#remove()} method on the
      * {@linkplain org.apache.sis.util.collection.TreeTable.Node#getChildren() children} iterator.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
index 4563198ae7..6232164bc3 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
@@ -55,7 +55,7 @@ import static org.apache.sis.internal.metadata.ImplementationHelper.valueIfDefin
  * Subclasses can follow the pattern below for every {@code get} and {@code set} methods,
  * with a different processing for singleton value or for {@linkplain Collection collections}.
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public class MyMetadata {
  *
  *         // ==== Example for a singleton value =============================
@@ -84,7 +84,7 @@ import static org.apache.sis.internal.metadata.ImplementationHelper.valueIfDefin
  *             properties = writeCollection(newValues, properties, Foo.class);
  *         }
  *     }
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.1
@@ -309,22 +309,22 @@ public abstract class ModifiableMetadata extends AbstractMetadata {
      *
      * <p>This method is typically invoked for getting a modifiable metadata from an unmodifiable one:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Metadata source  = ...;          // Any implementation.
      *     DefaultMetadata md = DefaultMetadata.castOrCopy(source);
      *     md = (DefaultMetadata) md.deepCopy(DefaultMetadata.State.EDITABLE);
-     * }
+     *     }
      *
      * <h4>Alternative</h4>
      * If unconditional copy is desired, or if the metadata to copy may be arbitrary implementations
      * of GeoAPI interfaces (i.e. not necessarily a {@code ModifiableMetadata} subclass),
      * then the following code can be used instead:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     MetadataCopier copier = new MetadataCopier(MetadataStandard.ISO_19115);
      *     Metadata source = ...;                           // Any implementation.
      *     Metadata copy = copier.copy(Metadata.class, source);
-     * }
+     *     }
      *
      * The {@code Metadata} type in above example can be replaced by any other ISO 19115 type.
      * Types from other standards can also be used if the {@link MetadataStandard#ISO_19115} constant
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
index 0ea2d55f13..69e9871bb3 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
@@ -122,16 +122,16 @@ class PropertyAccessor {
      * The implementation class, or {@link #type} if none.
      * The following condition must hold:
      *
-     * {@preformat java
-     *     type.isAssignableFrom(implementation);
-     * }
+     * {@snippet lang="java" :
+     *     assert type.isAssignableFrom(implementation);
+     *     }
      *
-     * <div class="note"><b>Design note:</b>
+     * <h4>Design note</h4>
      * We could enforce the above-cited restriction with type parameter: if the {@link #type} field is declared
      * as {@code Class<T>}, then this {@code implementation} field would be declared as {@code Class<? extends T>}.
      * However, this is not useful for this internal class because the {@code <T>} type is never known; we have the
      * {@code <?>} type everywhere except in tests, which result in compiler warnings at {@code PropertyAccessor}
-     * construction.</div>
+     * construction.
      */
     final Class<?> implementation;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
index 7eb27838f9..cf5b798869 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
@@ -713,13 +713,13 @@ class TreeNode implements Node {
      * The user shall set the identifier and the value, in that order, before
      * any other operation on the new child. Example:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     TreeTable.Node node = ...;
      *     TreeTable.Node child = node.newChild();
      *     child.setValue(TableColumn.IDENTIFIER, "title");
      *     child.setValue(TableColumn.VALUE, "Le petit prince");
      *     // Nothing else to do - node has been added.
-     * }
+     *     }
      *
      * Do not keep a reference to the returned node for a long time, since it is only
      * a proxy toward the real node to be created once the identifier is known.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
index 8ccfed083b..f2d20173c1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
@@ -82,9 +82,9 @@ final class TreeNodeChildren extends AbstractCollection<TreeTable.Node> {
      * {@link #metadata} object. This is given at construction time and shall be the
      * same than the following code:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     accessor = parent.table.standard.getAccessor(metadata.getClass(), true);
-     * }
+     *     }
      */
     final PropertyAccessor accessor;
 
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
index 41c6797f86..d6ce8f6526 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/ValueExistencePolicy.java
@@ -136,7 +136,7 @@ public enum ValueExistencePolicy {
      * This policy is relevant for metadata classes annotated with {@link TitleProperty};
      * for all other classes, this policy is identical to {@link #NON_EMPTY}.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * the {@link org.apache.sis.metadata.iso.citation.DefaultCitation} and
      * {@link org.apache.sis.metadata.iso.citation.DefaultCitationDate} classes are annotated with
      * <code>&#64;TitleProperty(name="title")</code> and <code>&#64;TitleProperty(name="date")</code>
@@ -162,7 +162,7 @@ public enum ValueExistencePolicy {
      *           └─Date type…… Creation
      *     }
      *   </td></tr>
-     * </table></div>
+     * </table>
      *
      * This policy is the default behavior of {@link AbstractMetadata#asTreeTable()},
      * and consequently defines the default rendering of {@link AbstractMetadata#toString()}.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
index 295f36aa6a..29aca8b100 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java
@@ -57,8 +57,8 @@ import org.apache.sis.xml.Namespaces;
  * <h2>Text, URN and XML representations</h2>
  * The XML representation of {@link DefaultIdentifier} is as the following example:
  *
- * {@preformat xml
- *   <mcc:MD_Identifier
+ * {@snippet lang="xml" :
+ *   <mcc:MD_Identifier>
  *     <mcc:code>
  *       <gco:CharacterString>4326</gco:CharacterString>
  *     </mcc:code>
@@ -70,7 +70,7 @@ import org.apache.sis.xml.Namespaces;
  *       </cit:CI_Citation>
  *     </mcc:authority>
  *   </mcc:MD_Identifier>
- * }
+ *   }
  *
  * <h2>Limitations</h2>
  * <ul>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
index 7c3e5aa5ac..f2729c257a 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
@@ -125,7 +125,7 @@ public final class Citations extends Static {
      * "OGP" identifier as "IOGP" (see the special case in fromName(String) method). This is also a way to share
      * the same citation instance in GML like below:</p>
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>
      * }
      *
@@ -159,7 +159,7 @@ public final class Citations extends Static {
      * But in the particular case of GML, both {@code "EPSG"} and {@code "IOGP"} appear in different locations.
      * For example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>
      * }
      *
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 a86994dba1..4509fd096b 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
@@ -530,9 +530,9 @@ public class DefaultCitation extends ISOMetadata implements Citation {
      * Returns the International Standard Book Number.
      * In this SIS implementation, invoking this method is equivalent to:
      *
-     * {@preformat java
-     *   return getIdentifierMap().getSpecialized(Citations.ISBN);
-     * }
+     * {@snippet lang="java" :
+     *     return getIdentifierMap().getSpecialized(Citations.ISBN);
+     *     }
      *
      * @return the ISBN, or {@code null} if none.
      *
@@ -549,9 +549,9 @@ public class DefaultCitation extends ISOMetadata implements Citation {
      * Sets the International Standard Book Number.
      * In this SIS implementation, invoking this method is equivalent to:
      *
-     * {@preformat java
-     *   getIdentifierMap().putSpecialized(Citations.ISBN, newValue);
-     * }
+     * {@snippet lang="java" :
+     *     getIdentifierMap().putSpecialized(Citations.ISBN, newValue);
+     *     }
      *
      * @param  newValue  the new ISBN, or {@code null} if none.
      *
@@ -569,9 +569,9 @@ public class DefaultCitation extends ISOMetadata implements Citation {
      * Returns the International Standard Serial Number.
      * In this SIS implementation, invoking this method is equivalent to:
      *
-     * {@preformat java
-     *   return getIdentifierMap().getSpecialized(Citations.ISSN);
-     * }
+     * {@snippet lang="java" :
+     *     return getIdentifierMap().getSpecialized(Citations.ISSN);
+     *     }
      *
      * @return the ISSN, or {@code null} if none.
      *
@@ -588,9 +588,9 @@ public class DefaultCitation extends ISOMetadata implements Citation {
      * Sets the International Standard Serial Number.
      * In this SIS implementation, invoking this method is equivalent to:
      *
-     * {@preformat java
-     *   getIdentifierMap().putSpecialized(Citations.ISSN, newValue);
-     * }
+     * {@snippet lang="java" :
+     *     getIdentifierMap().putSpecialized(Citations.ISSN, newValue);
+     *     }
      *
      * @param  newValue  the new ISSN.
      *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
index b958400878..351e123a15 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java
@@ -310,15 +310,14 @@ public class DefaultOnlineResource extends ISOMetadata implements OnlineResource
      * Returns the request used to access the resource depending on the protocol.
      * This is used mainly for POST requests.
      *
-     * <div class="note"><b>Example:</b>
-     * {@preformat xml
+     * <h4>Example</h4>
+     * {@snippet lang="xml" :
      *     <GetFeature service="WFS" version="2.0.0"
      *                 outputFormat="application/gml+xml;verson=3.2"
      *                 xmlns="(…snip…)">
      *         <Query typeNames="Roads"/>
      *     </GetFeature>
-     * }
-     * </div>
+     *     }
      *
      * @return Request used to access the resource.
      *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
index b100ef138f..23e6726fb1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
@@ -488,9 +488,9 @@ public final class Extents extends Static {
      * or {@code null} if none. First, this method computes the union of all temporal elements. Then this method
      * computes the linear interpolation between the start and end time as in the following pseudo-code:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return new Date(startTime + (endTime - startTime) * location);
-     * }
+     *     }
      *
      * Special cases:
      * <ul>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
index c635e21db8..23a99bf31d 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
@@ -264,9 +264,9 @@ public class DefaultRepresentativeFraction extends Number implements Representat
      * Returns {@code true} if no scale is defined.
      * The following relationship shall hold:
      *
-     * {@preformat java
-     *   assert isEmpty() == Double.isNaN(doubleValue());
-     * }
+     * {@snippet lang="java" :
+     *     assert isEmpty() == Double.isNaN(doubleValue());
+     *     }
      *
      * @return {@code true} if no scale is defined.
      *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java
index 4cf7975876..25b1d9dfa0 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java
@@ -82,10 +82,10 @@ import org.apache.sis.util.iso.Types;
  * or another database specified at construction time.
  * Metadata instances can be obtained as in the example below:
  *
- * {@preformat java
- *   MetadataSource metadata = MetadataSource.getProvided();
- *   Format format = source.lookup(Format.class, "PNG");
- * }
+ * {@snippet lang="java" :
+ *     MetadataSource metadata = MetadataSource.getProvided();
+ *     Format format = source.lookup(Format.class, "PNG");
+ *     }
  *
  * where {@code id} is the primary key value for the desired record in the {@code Format} table.
  *
@@ -178,7 +178,7 @@ public class MetadataSource implements AutoCloseable {
      * because a single JDBC connection cannot be assumed thread-safe.
      *
      * <p>Usage example:</p>
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Class<?> type = …;
      *     synchronized (this) {
      *         // Get an entry, or create a new one if no entry is available.
@@ -191,7 +191,7 @@ public class MetadataSource implements AutoCloseable {
      *         Object value = statement.getValue(…);
      *         preferredIndex = recycle(statement, preferredIndex);
      *     }
-     * }
+     *     }
      *
      * @see #prepareStatement(Class, String, int)
      * @see #recycle(CachedStatement, int)
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java
index b244a90535..ab49cacfd9 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataWriter.java
@@ -634,9 +634,9 @@ public class MetadataWriter extends MetadataSource {
      * Returns the SQL statement for creating the given table with the given primary key.
      * This method returns a string of the following form:
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     CREATE TABLE "schema"."table" (primaryKey VARCHAR(20) NOT NULL PRIMARY KEY)
-     * }
+     *     }
      */
     private String createTable(final String table, final String primaryKey) throws SQLException {
         return helper().clear().append("CREATE TABLE ").appendIdentifier(schema(), table)
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
index 4f91ff0fff..12a9c27709 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
@@ -98,19 +98,19 @@ public class DefaultLocalName extends AbstractName implements LocalName {
      * which replace the {@code LocalName} instance by an internal {@code NameValue} object (so the XML element
      * declared here is never marshalled). Example:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gco:LocalName codeSpace=\"A code space\">A name in a scope</gco:LocalName>
-     * }
+     *   }
      *
      * versus
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gco:TypeName>
      *     <gco:aName>
      *       <gco:CharacterString>Another local name</gco:CharacterString>
      *     </gco:aName>
      *   </gco:TypeName>
-     * }
+     *   }
      */
     @SuppressWarnings("serial")
     @XmlJavaTypeAdapter(CharSequenceAdapter.class)
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
index 99ef3143be..fb805a3fc1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
@@ -321,9 +321,9 @@ public class DefaultNameSpace implements NameSpace, Serializable {
      * {@linkplain AbstractName#toFullyQualifiedName() fully-qualified names} where
      * the following condition holds:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assert name.scope().isGlobal() == true;
-     * }
+     *     }
      *
      * @return the identifier of this namespace.
      */
@@ -509,10 +509,10 @@ public class DefaultNameSpace implements NameSpace, Serializable {
      * With this convention, it would be possible to create an <cite>expanded form</cite> of a generic name
      * (except for escaping of illegal characters) with a simple concatenation as in the following code example:
      *
-     * {@preformat java
-     *     GenericName name = ...; // A name
+     * {@snippet lang="java" :
+     *     GenericName name = ...;                // A name
      *     println("Expanded form = " + name.scope() + name);
-     * }
+     *     }
      *
      * However, the convention followed by this {@code DefaultNameSpace} implementation is not specified in the
      * {@link NameSpace} contract. This implementation follows the JCR convention for debugging convenience,
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecord.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
index e70021ff00..f9f7305b8f 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
@@ -438,14 +438,14 @@ public class DefaultRecord implements Record, Serializable {
      * A record can be anything, but usages that we have seen so far write a character
      * sequence or a code list. Examples:
      *
-     * {@preformat xml
-     *    <gco:Record>Alphanumeric values: Product is alphanumeric.</gco:Record>
-     *    <gco:Record>Alphanumeric Text: Message contains alphanumeric text.</gco:Record>
-     *    <gco:Record>Part A: Reflectivity presented as a tabular listing of alphanumerics.</gco:Record>
-     *    <gco:Record>
-     *      <gmd:CodeListValue codelist="someURL#DataQualityAssessment" codeListValue="intermediate">intermediate</gmd:CodeListValue>
-     *    </gco:Record>
-     * }
+     * {@snippet lang="xml" :
+     *   <gco:Record>Alphanumeric values: Product is alphanumeric.</gco:Record>
+     *   <gco:Record>Alphanumeric Text: Message contains alphanumeric text.</gco:Record>
+     *   <gco:Record>Part A: Reflectivity presented as a tabular listing of alphanumerics.</gco:Record>
+     *   <gco:Record>
+     *     <gmd:CodeListValue codelist="someURL#DataQualityAssessment" codeListValue="intermediate">intermediate</gmd:CodeListValue>
+     *   </gco:Record>
+     *   }
      *
      * @see <a href="https://issues.apache.org/jira/browse/SIS-419">SIS-419</a>
      */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
index ee1683dea4..35ad99a54a 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
@@ -63,8 +63,7 @@ import org.apache.sis.internal.metadata.RecordSchemaSIS;
  * {@link DefaultRecordSchema#createRecordType(CharSequence, Map)} method.
  * Example:
  *
- * <div class="note">
- * {@preformat java
+ * {@snippet lang="java" :
  *     DefaultRecordSchema schema = new DefaultRecordSchema(null, null, "MySchema");
  *     // The same instance can be reused for all records to create in that schema.
  *
@@ -74,8 +73,7 @@ import org.apache.sis.internal.metadata.RecordSchemaSIS;
  *     fields.put("longitude",   Double .class);
  *     fields.put("population",  Integer.class);
  *     RecordType record = schema.createRecordType("MyRecordType", fields);
- * }
- * </div>
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus inherently thread-safe if the {@link TypeName}, the {@link RecordSchema}
@@ -294,9 +292,9 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
      * {@linkplain DefaultRecordSchema record schema}, then the record type name shall be valid in the
      * {@linkplain DefaultNameSpace name space} of the record schema:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     NameSpace namespace = getContainer().getSchemaName().scope()
-     * }
+     *     }
      *
      * <div class="note"><b>Comparison with Java reflection:</b>
      * If we think about this {@code RecordType} as equivalent to a {@code Class} instance,
@@ -347,9 +345,9 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
      * Returns the set of attribute names defined in this {@code RecordType}'s dictionary.
      * This method is functionally equivalent to the following code, but slightly more efficient:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     getFieldTypes().keySet();
-     * }
+     *     }
      *
      * @return the set of field names, or an empty set if none.
      */
@@ -369,14 +367,13 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
      * Returns the type associated to the given attribute name, or {@code null} if none.
      * This method is functionally equivalent to (omitting the check for null value):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     getFieldTypes().get(name).getTypeName();
-     * }
+     *     }
      *
-     * <div class="note"><b>Comparison with Java reflection:</b>
+     * <h4>Comparison with Java reflection</h4>
      * If we think about this {@code RecordType} as equivalent to a {@code Class} instance, then
      * this method can be though as related to the Java {@link Class#getField(String)} method.
-     * </div>
      *
      * @param  fieldName  the attribute name for which to get the associated type name.
      * @return the associated type name, or {@code null} if none.
@@ -391,14 +388,14 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
      * Determines if the given record is compatible with this record type. This method returns {@code true}
      * if the given {@code record} argument is non-null and the following condition holds:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Set<MemberName> attributeNames = record.getAttributes().keySet();
      *     boolean isInstance = getMembers().containsAll(attributeNames);
-     * }
+     *     }
      *
-     * <div class="note"><b>Implementation note:</b>
+     * <h4>Implementation note</h4>
      * We do not require that {@code record.getRecordType() == this} in order to allow record
-     * "sub-types" to define additional fields, in a way similar to Java sub-classing.</div>
+     * "sub-types" to define additional fields, in a way similar to Java sub-classing.
      *
      * @param  record  the record to test for compatibility.
      * @return {@code true} if the given record is compatible with this {@code RecordType}.
@@ -479,12 +476,12 @@ public class DefaultRecordType extends RecordDefinition implements RecordType, S
      * A record can be anything, but usages that we have seen so far write a character sequence
      * of what seems <var>key</var>-<var>description</var> pairs. Examples:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gco:RecordType>
      *     General Meteorological Products: General products include the baseline reflectivity and velocity,
      *     and also algorithmic graphic products spectrum width, vertical integrated liquid, and VAD wind profile.
      *   </gco:RecordType>
-     * }
+     *   }
      *
      * @see <a href="https://issues.apache.org/jira/browse/SIS-419">SIS-419</a>
      */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/Types.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/Types.java
index e0a9599dab..57b68f5b2f 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/Types.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/Types.java
@@ -75,13 +75,20 @@ import static java.util.logging.Logger.getLogger;
  *
  * <h2>Substituting a free text by a code list</h2>
  * The ISO standard allows to substitute some character strings in the <cite>"free text"</cite> domain
- * by a {@link CodeList} value.
+ * by a {@link CodeList} value. Such substitution can be done with:
  *
- * <div class="note"><b>Example:</b>
- * in the following XML fragment, the {@code <mac:type>} value is normally a {@code <gco:CharacterString>}
+ * <ul>
+ *   <li>{@link #getCodeTitle(ControlledVocabulary)} for getting the {@link InternationalString} instance
+ *       to store in a metadata property.</li>
+ *   <li>{@link #forCodeTitle(CharSequence)} for retrieving the {@link CodeList} previously stored as an
+ *       {@code InternationalString}.</li>
+ * </ul>
+ *
+ * <h2>Example</h2>
+ * In the following XML fragment, the {@code <mac:type>} value is normally a {@code <gco:CharacterString>}
  * but has been replaced by a {@code SensorType} code below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <mac:MI_Instrument>
  *     <mac:type>
  *       <gmi:MI_SensorTypeCode
@@ -89,17 +96,7 @@ import static java.util.logging.Logger.getLogger;
  *           codeListValue="RADIOMETER">Radiometer</gmi:MI_SensorTypeCode>
  *     </mac:type>
  *   </mac:MI_Instrument>
- * }
- * </div>
- *
- * Such substitution can be done with:
- *
- * <ul>
- *   <li>{@link #getCodeTitle(ControlledVocabulary)} for getting the {@link InternationalString} instance
- *       to store in a metadata property.</li>
- *   <li>{@link #forCodeTitle(CharSequence)} for retrieving the {@link CodeList} previously stored as an
- *       {@code InternationalString}.</li>
- * </ul>
+ *   }
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 1.0
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifiedObject.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifiedObject.java
index 2ab996e908..afeff1f93b 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifiedObject.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifiedObject.java
@@ -32,10 +32,10 @@ import org.opengis.metadata.citation.Citation;
  * attributes of the XML element. Those identifiers can be specified using the {@link IdentifierSpace}
  * enum values as below:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     IdentifiedObject object = ...;
  *     object.getIdentifierMap().put(IdentifierSpace.ID, "myID");
- * }
+ *     }
  *
  * <h2>Relationship with GeoAPI</h2>
  * Identifiers exist also in some (not all) GeoAPI objects. Some GeoAPI objects
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifierSpace.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifierSpace.java
index 6416194f23..7903d38e88 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifierSpace.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/IdentifierSpace.java
@@ -29,7 +29,7 @@ import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
  * group are handled in a special way. For example, identifiers associated to the {@link #HREF}
  * space are marshalled in the outer property element, as in the example below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <cit:CI_Citation>
  *     <cit:series xlink:href="http://myReference">
  *       <cit:CI_Series>
@@ -37,7 +37,7 @@ import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
  *       </cit:CI_Series>
  *     </cit:series>
  *   </cit:CI_Citation>
- * }
+ *   }
  *
  * The values defined in this interface can be used as keys in the map returned by
  * {@link IdentifiedObject#getIdentifierMap()}.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java
index 734550d2f6..aeb140066c 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java
@@ -45,11 +45,11 @@ import static java.util.logging.Logger.getLogger;
  * {@link #acquireUnmarshaller()} methods, and can restitute the (un)marshaller to the pool
  * after usage like below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Marshaller marshaller = pool.acquireMarshaller();
  *     marshaller.marchall(...);
  *     pool.recycle(marshaller);
- * }
+ *     }
  *
  * <h2>Configuring (un)marshallers</h2>
  * The (un)marshallers created by this class can optionally by configured with the SIS-specific
@@ -290,11 +290,11 @@ public class MarshallerPool {
      *
      * <p>This method shall be used as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Marshaller marshaller = pool.acquireMarshaller();
      *     marshaller.marchall(...);
      *     pool.recycle(marshaller);
-     * }
+     *     }
      *
      * Note that {@link #recycle(Marshaller)} shall not be invoked in case of exception,
      * since the marshaller may be in an invalid state.
@@ -316,11 +316,11 @@ public class MarshallerPool {
      *
      * <p>This method shall be used as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Unmarshaller unmarshaller = pool.acquireUnmarshaller();
      *     Unmarshaller.unmarchall(...);
      *     pool.recycle(unmarshaller);
-     * }
+     *     }
      *
      * Note that {@link #recycle(Unmarshaller)} shall not be invoked in case of exception,
      * since the unmarshaller may be in an invalid state.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/NilObject.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/NilObject.java
index c11933f844..96b46f2fc8 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/NilObject.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/NilObject.java
@@ -38,7 +38,7 @@ package org.apache.sis.xml;
  *   <th>Normal {@code Series} element</th>
  *   <th>Unknown {@code Series} element</th>
  * </tr><tr><td>
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <cit:CI_Citation>
  *     <cit:series>
  *       <cit:CI_Series>
@@ -46,13 +46,13 @@ package org.apache.sis.xml;
  *       </cit:CI_Series>
  *     </cit:series>
  *   </cit:CI_Citation>
- * }
+ *   }
  * </td><td>
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <cit:CI_Citation>
  *     <cit:series nilReason="unknown"/>
  *   </cit:CI_Citation>
- * }
+ *   }
  * </td></tr></table>
  *
  * If the {@code CI_Series} element was completely omitted, then {@link org.opengis.metadata.citation.Citation#getSeries()}
@@ -66,9 +66,9 @@ package org.apache.sis.xml;
  * is missing, then invoking {@link NilReason#createNilObject(Class)}. The following example
  * instantiates a {@code Citation} object which is nil because the information are missing:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Citation nil = NilReason.MISSING.createNilObject(Citation.class);
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.3
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 cc112fc728..5b327690ca 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
@@ -520,14 +520,14 @@ abstract class Pooled {
      * Must be invoked by subclasses before a {@code try} block performing a (un)marshalling
      * operation. Must be followed by a call to {@code finish()} in a {@code finally} block.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Context context = begin();
      *     try {
      *         ...
      *     } finally {
      *         context.finish();
      *     }
-     * }
+     *     }
      *
      * @see Context#finish()
      */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/Transformer.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/Transformer.java
index 290a365d1c..84a61c775b 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/Transformer.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/Transformer.java
@@ -143,7 +143,7 @@ abstract class Transformer {
      * JAXB annotations. For example, given the following XML, this list should contain {@code cit:CI_Citation},
      * {@code cit:date} and {@code cit:CI_Date} (in that order) when the (un)marshalling reaches the "…" location.
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <cit:CI_Citation>
      *     <cit:date>
      *       <cit:CI_Date>
@@ -151,7 +151,7 @@ abstract class Transformer {
      *       </cit:CI_Date>
      *     </cit:date>
      *   </cit:CI_Citation>
-     * }
+     *   }
      */
     private final List<QName> outerElements;
 
@@ -455,7 +455,7 @@ abstract class Transformer {
      * For example, given the following XML, this method returns {@code true} for {@code cit:CI_Date} but
      * {@code false} for {@code cit:date}:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <cit:CI_Citation>
      *     <cit:date>
      *       <cit:CI_Date>
@@ -463,7 +463,7 @@ abstract class Transformer {
      *       </cit:CI_Date>
      *     </cit:date>
      *   </cit:CI_Citation>
-     * }
+     *   }
      *
      * This method is based on simple heuristic applicable to OGC/ISO conventions,
      * and may change in any future SIS version depending on new formats to support.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/ValueConverter.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/ValueConverter.java
index 895f00fb99..e793b6b8cc 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/ValueConverter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/ValueConverter.java
@@ -44,9 +44,9 @@ import org.apache.sis.util.Locales;
  * document to fail. An application may want to change this behavior by replacing URLs that
  * are known to be erroneous by fixed versions of those URLs. Example:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     class URLFixer extends ValueConverter {
- *         &#64;Override
+ *         @Override
  *         public URL toURL(MarshalContext context, URI uri) throws MalformedURLException {
  *             try {
  *                 return super.toURL(context, uri);
@@ -59,7 +59,7 @@ import org.apache.sis.util.Locales;
  *             }
  *         }
  *     }
- * }
+ *     }
  *
  * See the {@link XML#CONVERTER} javadoc for an example of registering a custom
  * {@code ValueConverter} to a (un)marshaller.
@@ -369,9 +369,9 @@ public class ValueConverter {
      * is as below, omitting the check for null value and the call to {@link #exceptionOccured
      * exceptionOccured(…)} in case of error:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return UUID.fromString(value);
-     * }
+     *     }
      *
      * @param  context  context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.
      * @param  value    the string to convert to a UUID, or {@code null}.
@@ -398,9 +398,9 @@ public class ValueConverter {
      * (omitting the check for null value and the call to {@link #exceptionOccured
      * exceptionOccured(…)} in case of error):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return new URI(value);
-     * }
+     *     }
      *
      * @param  context  context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.
      * @param  value    the string to convert to a URI, or {@code null}.
@@ -427,9 +427,9 @@ public class ValueConverter {
      * the check for null value and the call to {@link #exceptionOccured exceptionOccured(…)}
      * in case of error:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return value.toURI();
-     * }
+     *     }
      *
      * @param  context  context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.
      * @param  value    the URL to convert to a URI, or {@code null}.
@@ -455,9 +455,9 @@ public class ValueConverter {
      * the check for null value and the call to {@link #exceptionOccured exceptionOccured(…)}
      * in case of error:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return value.toURL();
-     * }
+     *     }
      *
      * @param  context  context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.
      * @param  value    the URI to convert to a URL, or {@code null}.
@@ -483,9 +483,9 @@ public class ValueConverter {
      * omitting the check for null value and the call to {@link #exceptionOccured exceptionOccured(…)}
      * in case of error:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return NilReason.valueOf(value);
-     * }
+     *     }
      *
      * @param  context  context (GML version, locale, <i>etc.</i>) of the (un)marshalling process.
      * @param  value    the string to convert to a nil reason, or {@code null}.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
index 85334b19a5..6821b279b6 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
@@ -265,12 +265,12 @@ public final class XML extends Static {
      * database. Users can define their search algorithm by subclassing {@link ReferenceResolver} and configuring
      * a unmarshaller as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     ReferenceResolver  myResolver = ...;
      *     Map<String,Object> properties = new HashMap<>();
      *     properties.put(XML.RESOLVER, myResolver);
      *     Object obj = XML.unmarshal(source, properties);
-     * }
+     *     }
      *
      * @see Unmarshaller#setProperty(String, Object)
      * @see ReferenceResolver
@@ -289,17 +289,17 @@ public final class XML extends Static {
      * for replacing an erroneous URL by a fixed URL. See the {@link ValueConverter} javadoc for
      * more details.</p>
      *
-     * <div class="note"><b>Example:</b>
-     * the following example collects the failures in a list without stopping the (un)marshalling process.
+     * <h4>Example</h4>
+     * The following example collects the failures in a list without stopping the (un)marshalling process.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     class WarningCollector extends ValueConverter {
      *         // The warnings collected during (un)marshalling.
      *         List<String> messages = new ArrayList<String>();
      *
      *         // Override the default implementation in order to
      *         // collect the warnings and allow the process to continue.
-     *         &#64;Override
+     *         @Override
      *         protected <T> boolean exceptionOccured(MarshalContext context,
      *                 T value, Class<T> sourceType, Class<T> targetType, Exception e)
      *         {
@@ -319,7 +319,6 @@ public final class XML extends Static {
      *         // Report here the warnings to the user.
      *     }
      * }
-     * </div>
      *
      * @see Unmarshaller#setProperty(String, Object)
      * @see ValueConverter
@@ -340,7 +339,7 @@ public final class XML extends Static {
      * <div class="note"><b>Example:</b>
      * INSPIRE compliant language code shall be formatted like below (details may vary):
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gmd:language>
      *     <gmd:LanguageCode
      *         codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#LanguageCode"
@@ -351,7 +350,7 @@ public final class XML extends Static {
      * However if this property contains the "{@code language}" value, then the marshaller will format
      * the language code like below (which is legal according OGC schemas, but is not INSPIRE compliant):
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <lan:language>
      *     <gco:CharacterString>fra</gco:CharacterString>
      *   </lan:language>
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java
index 4d5fce35b6..b667651652 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/package-info.java
@@ -24,13 +24,13 @@
  * property keys that can be used for configuring (un)marshallers and convenience static methods.
  * For example, the following code:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     XML.marshal(Citations.OGC, System.out);
- * }
+ *     }
  *
  * will produce a string like below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  *   <cit:CI_Citation xmlns:gmd="http://www.isotc211.org/2005/gmd"
  *                    xmlns:gco="http://www.isotc211.org/2005/gco">
@@ -39,7 +39,7 @@
  *     </cit:title>
  *     ... much more XML below this point ...
  *   </cit:CI_Citation>
- * }
+ *   }
  *
  * <h2>Customizing the XML</h2>
  * In order to parse and format ISO 19115-3 compliant documents, SIS needs its own
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 d3d675caef..b20ea7e251 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
@@ -39,9 +39,9 @@ public final strictfp class MeasureTest extends TestCase {
      * The URL used in {@code uom} attribute of XML elements which contains a measurements.
      * Example:
      *
-     * {@preformat xml
-     *     <gco:Distance uom="http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])">1000.0</gco:Distance>
-     * }
+     * {@snippet lang="xml" :
+     *   <gco:Distance uom="http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])">1000.0</gco:Distance>
+     *   }
      */
     public static final String UOM_URL = CodeListUID.METADATA_ROOT_LEGACY + CodeListUID.UOM_PATH;
 
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 cb14efb036..255046b793 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
@@ -109,13 +109,13 @@ public final strictfp class LanguageCodeTest extends TestCase {
      * Returns the XML of a metadata element. This method returns a string like below,
      * where the {@code ${languageCode}} string is replaced by the given argument.
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gmd:MD_Metadata>
      *     <gmd:language>
      *       ${languageCode}
      *     </gmd:language>
      *   </gmd:MD_Metadata>
-     * }
+     *   }
      *
      * @param  languageCode  the XML fragment to write inside the {@code <gmd:language>} element.
      */
@@ -150,13 +150,13 @@ public final strictfp class LanguageCodeTest extends TestCase {
     /**
      * Tests the unmarshalling using the {@code <gmd:LanguageCode>} construct. XML fragment:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gmd:MD_Metadata>
      *     <gmd:language>
      *       <gmd:LanguageCode codeList="(snip)/gmxCodelists.xml#LanguageCode" codeListValue="jpn">Japanese</gmd:LanguageCode>
      *     </gmd:language>
      *   </gmd:MD_Metadata>
-     * }
+     *   }
      *
      * @throws JAXBException if an error occurs while unmarshalling the language.
      *
@@ -174,13 +174,13 @@ public final strictfp class LanguageCodeTest extends TestCase {
      * Tests the unmarshalling using the {@code <gmd:LanguageCode>} construct without attributes.
      * The adapter is expected to parse the element value. XML fragment:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gmd:MD_Metadata>
      *     <gmd:language>
      *       <gmd:LanguageCode>jpn</gmd:LanguageCode>
      *     </gmd:language>
      *   </gmd:MD_Metadata>
-     * }
+     *   }
      *
      * @throws JAXBException if an error occurs while unmarshalling the language.
      */
@@ -217,13 +217,13 @@ public final strictfp class LanguageCodeTest extends TestCase {
      * Tests the unmarshalling of an XML using the {@code gco:CharacterString} construct.
      * XML fragment:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gmd:MD_Metadata>
      *     <gmd:language>
      *       <gco:CharacterString>jpn</gco:CharacterString>
      *     </gmd:language>
      *   </gmd:MD_Metadata>
-     * }
+     *   }
      *
      * @throws JAXBException if an error occurs while unmarshalling the language.
      */
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 70f16a3605..298be20fa6 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
@@ -107,13 +107,13 @@ public final strictfp class DefaultResolutionTest extends TestCase {
      * Tests XML (un)marshalling of a resolution element. This test creates a {@link DefaultResolution}
      * instance which is expected to be marshalled as below (ignoring namespace declarations):
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <mri:MD_Resolution>
      *     <mri:distance>
      *       <gco:Distance uom="http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])">1000.0</gco:Distance>
      *     </mri:distance>
      *   </mri:MD_Resolution>
-     * }
+     *   }
      *
      * @throws JAXBException if an error occurred while marshalling the element.
      */
@@ -138,13 +138,13 @@ public final strictfp class DefaultResolutionTest extends TestCase {
      * This test creates a {@link DefaultResolution} instance which is expected to be marshalled as below
      * (ignoring namespace declarations):
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gmd:MD_Resolution>
      *     <gmd:distance>
      *       <gco:Distance uom="http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])">1000.0</gco:Distance>
      *     </gmd:distance>
      *   </gmd:MD_Resolution>
-     * }
+     *   }
      *
      * @throws JAXBException if an error occurred while marshalling the element.
      */
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 05b10aaf34..c277347315 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
@@ -139,7 +139,7 @@ public abstract strictfp class AnnotationConsistencyCheck extends TestCase {
      * directly inside its parent as we usually do in XML. Instead, we have a {@code <CI_Contact>}.
      * inside the {@code <contactInfo>} element as below:</p>
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <CI_ResponsibleParty>
      *     <contactInfo>
      *       <CI_Contact>
@@ -147,7 +147,7 @@ public abstract strictfp class AnnotationConsistencyCheck extends TestCase {
      *       </CI_Contact>
      *     </contactInfo>
      *   </CI_ResponsibleParty>
-     * }
+     *   }
      *
      * To reflect that fact, this method shall return the internal {@code CI_Contact}
      * wrapper class for the {@link org.apache.sis.metadata.iso.citation.DefaultCitation} argument.
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/xml/ReferenceResolverMock.java b/core/sis-metadata/src/test/java/org/apache/sis/xml/ReferenceResolverMock.java
index acacde4878..3f7cdf84cd 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/xml/ReferenceResolverMock.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/xml/ReferenceResolverMock.java
@@ -41,14 +41,14 @@ public final strictfp class ReferenceResolverMock extends ReferenceResolver {
      * Creates a new SIS context using a {@code ReferenceResolverMock}.
      * Callers shall use this method in a {@code try} … {@code finally} block as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     final Context context = ReferenceResolverMock.begin(true);
      *     try {
      *         // So some test
      *     } finally {
      *         context.finish();
      *     }
-     * }
+     *     }
      *
      * Alternatively, the {@code finally} block can be replaced by a call to {@code context.finish()} in a method
      * annotated by {@link org.junit.After}. This is done automatically by {@link org.apache.sis.test.xml.TestCase}.
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 ad6ca6bf1e..468ab17857 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
@@ -62,7 +62,7 @@ import org.apache.sis.internal.xml.LegacyNamespaces;
  *
  * For generating a new file:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public static void main(String[] args) throws Exception {
  *         RenameListGenerator gen = new RenameListGenerator(Paths.get("/home/user/project/build/classes"));
  *         gen.add(Paths.get("org/apache/sis/metadata/iso"));
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java b/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java
index 14214bc58d..db367ee153 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java
@@ -97,7 +97,7 @@ public final strictfp class UUIDMarshallingTest extends TestCase {
      * The element of interest for this test is the {@code "uuid"} attribute value
      * in the {@code <cit:CI_Series>} element of the following XML fragment:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <cit:CI_Citation>
      *     <cit:title>
      *       <gco:CharacterString>My data</gco:CharacterString>
@@ -110,7 +110,7 @@ public final strictfp class UUIDMarshallingTest extends TestCase {
      *       </cit:CI_Series>
      *     </cit:series>
      *   </cit:CI_Citation>
-     * }
+     *   }
      *
      * On an implementation note, the {@code uuid} and other attributes of the {@code <cit:CI_Series>}
      * elements are handled by {@link org.apache.sis.internal.jaxb.gco.PropertyType}.
@@ -148,7 +148,7 @@ public final strictfp class UUIDMarshallingTest extends TestCase {
      * <p>The element of interest for this test is the {@code "uuidref"} part
      * in the {@code <cit:series>} property of the following XML fragment:</p>
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <cit:CI_Citation>
      *     <cit:title>
      *       <gco:CharacterString>My data</gco:CharacterString>
@@ -161,7 +161,7 @@ public final strictfp class UUIDMarshallingTest extends TestCase {
      *       </cit:CI_Series>
      *     </cit:series>
      *   </cit:CI_Citation>
-     * }
+     *   }
      *
      * On an implementation note, the {@code uuidref}, {@code xlink:href} and other attributes of the
      * {@code <cit:series>} element are handled by {@link org.apache.sis.internal.jaxb.gco.PropertyType}.
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java b/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java
index 4faf343014..53b1acdda4 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java
@@ -87,11 +87,11 @@ public final strictfp class XLinkMarshallingTest extends TestCase {
      * Tests (un)marshalling of an object with a {@code xlink:href} attribute without element definition.
      * The XML fragment is:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <mdb:MD_Metadata>
      *     <mdb:identificationInfo xlink:href="http://test.net"/>
      *   </mdb:MD_Metadata>
-     * }
+     *   }
      *
      * @throws JAXBException if an error occurred during (un)marshalling.
      * @throws URISyntaxException if the URI used in this test is malformed.
@@ -113,7 +113,7 @@ public final strictfp class XLinkMarshallingTest extends TestCase {
      * Tests (un)marshalling of an object with a {@code xlink:href} attribute with an element definition.
      * The XML fragment is:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <mdb:MD_Metadata>
      *     <mdb:identificationInfo xlink:href="http://test.net">
      *       <mdb:MD_DataIdentification>
@@ -123,7 +123,7 @@ public final strictfp class XLinkMarshallingTest extends TestCase {
      *       </mdb:MD_DataIdentification>
      *     </mdb:identificationInfo>
      *   </mdb:MD_Metadata>
-     * }
+     *   }
      *
      * @throws JAXBException if an error occurred during (un)marshalling.
      * @throws URISyntaxException if the URI used in this test is malformed.
diff --git a/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/CanvasFollower.java b/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/CanvasFollower.java
index 632eaf5500..6727290c6e 100644
--- a/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/CanvasFollower.java
+++ b/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/CanvasFollower.java
@@ -165,12 +165,12 @@ public class CanvasFollower implements PropertyChangeListener, Disposable {
      * but not necessarily immediately after (it is okay to defer until first needed).
      * The default implementation registers the following listeners:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     source.addPropertyChangeListener(PlanarCanvas.OBJECTIVE_CRS_PROPERTY, this);
      *     target.addPropertyChangeListener(PlanarCanvas.OBJECTIVE_CRS_PROPERTY, this);
      *     source.addPropertyChangeListener(PlanarCanvas.OBJECTIVE_TO_DISPLAY_PROPERTY, this);
      *     target.addPropertyChangeListener(PlanarCanvas.OBJECTIVE_TO_DISPLAY_PROPERTY, this);
-     * }
+     *     }
      *
      * This method is idempotent (it is okay to invoke it twice).
      *
diff --git a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/AbstractLocationType.java b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/AbstractLocationType.java
index d7752b976d..b889c9d637 100644
--- a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/AbstractLocationType.java
+++ b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/AbstractLocationType.java
@@ -165,9 +165,9 @@ abstract class AbstractLocationType implements LocationType, LenientComparable {
      * and {@link #getReferenceSystem()}, for avoiding never-ending loops.
      *
      * <p>This method is implemented as below:</p>
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return equals(object, ComparisonMode.STRICT);
-     * }
+     *     }
      *
      * @param  object  the object to compare to {@code this}.
      * @return {@code true} if both objects are equal.
diff --git a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
index 1f0575558f..a1f4effa7a 100644
--- a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
+++ b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
@@ -113,12 +113,12 @@ import org.opengis.referencing.gazetteer.LocationType;
  * <div class="note"><b>Example:</b>
  * the following code:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     MilitaryGridReferenceSystem system = new MilitaryGridReferenceSystem();
  *     MilitaryGridReferenceSystem.Coder coder = system.createCoder();
  *     Location loc = coder.decode("32TNL83");
  *     System.out.println(loc);
- * }
+ *     }
  *
  * should display (locale may vary):
  *
@@ -193,20 +193,20 @@ public class MilitaryGridReferenceSystem extends ReferencingByIdentifiers {
      * The first of the two letters ({@code 'I'} and {@code 'O'}) excluded in MGRS notation.
      * This letter and all following letters shall be shifted by one character. Example:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     char band = ...;
      *     if (band >= EXCLUDE_I) {
      *         band++;
      *         if (band >= EXCLUDE_O) band++;
      *     }
-     * }
+     *     }
      *
      * or equivalently:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     char band = ...;
      *     if (band >= EXCLUDE_I && ++band >= EXCLUDE_O) band++;
-     * }
+     *     }
      */
     private static final char EXCLUDE_I = 'I';
 
@@ -1823,16 +1823,16 @@ public class MilitaryGridReferenceSystem extends ReferencingByIdentifiers {
          *     coordinates in the latitude band, as a multiple of the number of metres in a full cycle of
          *     {@value #GRID_ROW_COUNT} rows. That northing value can be computed in metre as below:
          *
-         *     {@preformat java
+         *     {@snippet lang="java" :
          *         double northing = (ROW_RESOLVER[i] & NORTHING_BITS_MASK) * (GRID_SQUARE_SIZE * GRID_ROW_COUNT);
-         *     }
+         *         }
          *   </li><li>
          *     Given a row number <var>row</var> in the [0 … 19] range, the following expression tells
          *     if that row can be inside the latitude band:
          *
-         *     {@preformat java
+         *     {@snippet lang="java" :
          *         boolean isValidRow = (ROW_RESOLVER[i] & (1 << (row + NORTHING_BITS_COUNT))) != 0;
-         *     }
+         *         }
          *
          *     Note that the same row may be valid in two consecutive latitude bands.
          *     The trailing {@code _0000} parts make room for {@value #NORTHING_BITS_COUNT} bits.
diff --git a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java
index 4b06d9a226..65653a492f 100644
--- a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java
+++ b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ModifiableLocationType.java
@@ -44,29 +44,29 @@ import org.opengis.referencing.gazetteer.ReferenceSystemUsingIdentifiers;
  * Instead, unmodifiable {@linkplain #snapshot snapshots} should be published.
  * The same {@code ModifiableLocationType} instance can be used for many snapshots.
  *
- * <div class="note"><b>Example:</b>
+ * <h2>Example</h2>
  * the following code creates 3 levels of location types: <var>administrative areas</var>, which contain
  * <var>towns</var>, which themselves contain <var>streets</var>. Note that the {@code street} location
  * type has two parents, {@code town} and {@code area}, because a street can be outside any town and
  * directly under the authority of an administrative area instead.
  *
- * {@preformat java
- *   ModifiableLocationType area   = new ModifiableLocationType("administrative area");
- *   ModifiableLocationType town   = new ModifiableLocationType("town");
- *   ModifiableLocationType street = new ModifiableLocationType("street");
+ * {@snippet lang="java" :
+ *     ModifiableLocationType area   = new ModifiableLocationType("administrative area");
+ *     ModifiableLocationType town   = new ModifiableLocationType("town");
+ *     ModifiableLocationType street = new ModifiableLocationType("street");
  *
- *   area  .setTheme("local administration");
- *   town  .setTheme("built environment");
- *   street.setTheme("access");
+ *     area  .setTheme("local administration");
+ *     town  .setTheme("built environment");
+ *     street.setTheme("access");
  *
- *   area  .setDefinition("area of responsibility of highest level local authority");
- *   town  .setDefinition("city or town");
- *   street.setDefinition("thoroughfare providing access to properties");
+ *     area  .setDefinition("area of responsibility of highest level local authority");
+ *     town  .setDefinition("city or town");
+ *     street.setDefinition("thoroughfare providing access to properties");
  *
- *   town  .addParent(area);
- *   street.addParent(area);
- *   street.addParent(town);
- * }
+ *     town  .addParent(area);
+ *     street.addParent(area);
+ *     street.addParent(town);
+ *     }
  *
  * A string representation of the {@code area} location type is as below:
  *
@@ -76,7 +76,6 @@ import org.opengis.referencing.gazetteer.ReferenceSystemUsingIdentifiers;
  *     │   └─street……………………………… thoroughfare providing access to properties
  *     └─street………………………………………… thoroughfare providing access to properties
  * }
- * </div>
  *
  * <h2>Inheritance of property values</h2>
  * According ISO 19112:2003, all properties except the collection of
@@ -95,9 +94,9 @@ import org.opengis.referencing.gazetteer.ReferenceSystemUsingIdentifiers;
  * reasonably presumed to be in the same territory of use. That territory can be specified only once
  * as below:
  *
- * {@preformat java
- *   area.setTerritoryOfUse("Japan");
- * }
+ * {@snippet lang="java" :
+ *     area.setTerritoryOfUse("Japan");
+ *     }
  *
  * Then, the towns and streets automatically inherit the same value for that property,
  * unless they are explicitly given another value.</div>
diff --git a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java
index 45477c973e..59a2b71b61 100644
--- a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java
+++ b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java
@@ -320,10 +320,10 @@ public abstract class ReferencingByIdentifiers extends AbstractReferenceSystem i
          * A combined method which sets the encoder precision to the given value, then formats the given position.
          * The default implementation is equivalent to the following code:
          *
-         * {@preformat java
+         * {@snippet lang="java" :
          *     setPrecision(precision, position);
          *     return encode(position);
-         * }
+         *     }
          *
          * Subclasses should override with more efficient implementation,
          * for example by transforming the given position only once.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
index 105e5686bd..5506c8606f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
@@ -238,9 +238,9 @@ public abstract class AbstractDirectPosition extends FormattableObject implement
      * The format is like below, where {@code x₀}, {@code x₁}, {@code x₂}, <i>etc.</i>
      * are the coordinate values at index 0, 1, 2, <i>etc.</i>:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POINT[x₀ x₁ x₂ …]
-     * }
+     *   }
      *
      * If the coordinate reference system is geodetic or projected, then coordinate values are formatted
      * with a precision equivalent to one centimetre on Earth (the actual number of fraction digits is
@@ -265,9 +265,9 @@ public abstract class AbstractDirectPosition extends FormattableObject implement
      * The returned string is like below, where {@code x₀}, {@code x₁}, {@code x₂}, <i>etc.</i>
      * are the coordinate values at index 0, 1, 2, <i>etc.</i>:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POINT(x₀ x₁ x₂ …)
-     * }
+     *   }
      *
      * This method formats the numbers as with {@link Double#toString(double)} (i.e. without fixed number of fraction digits).
      * The string returned by this method can be {@linkplain GeneralDirectPosition#GeneralDirectPosition(CharSequence) parsed}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
index db823c6fad..e78dfa66f3 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
@@ -268,11 +268,11 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
      * For example in the following code, {@code NaN} values were implicitly checked by
      * the {@code (a < b)} comparison:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (a < b && isNegativeUnsafe(a)) {
      *         // ... do some stuff
      *     }
-     * }
+     *     }
      */
     static boolean isNegativeUnsafe(final double value) {
         return (Double.doubleToRawLongBits(value) & SIGN_BIT_MASK) != 0;
@@ -427,9 +427,9 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
      * Returns the median coordinate along the specified dimension.
      * In most cases, the result is equal (minus rounding error) to:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     median = (getUpper(dimension) + getLower(dimension)) / 2;
-     * }
+     *     }
      *
      * <h4>Crossing the anti-meridian of a Geographic CRS</h4>
      * If <var>upper</var> &lt; <var>lower</var> and the
@@ -480,9 +480,9 @@ public abstract class AbstractEnvelope extends FormattableObject implements Enve
      * Returns the envelope span (typically width or height) along the specified dimension.
      * In most cases, the result is equal (minus rounding error) to:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     span = getUpper(dimension) - getLower(dimension);
-     * }
+     *     }
      *
      * <h4>Crossing the anti-meridian of a Geographic CRS</h4>
      * If <var>upper</var> &lt; <var>lower</var> and the
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
index d27ed75799..bb83bde6a1 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
@@ -212,9 +212,9 @@ class ArrayEnvelope extends AbstractEnvelope implements Serializable {
      * {@code BOX} or <cite>Well Known Text</cite> (WKT) format. The given string is typically
      * a {@code BOX} element like below:
      *
-     * {@preformat wkt
-     *     BOX(-180 -90, 180 90)
-     * }
+     * {@snippet lang="wkt" :
+     *   BOX(-180 -90, 180 90)
+     *   }
      *
      * However, this constructor is lenient to other geometry types like {@code POLYGON}.
      * See the javadoc of the {@link GeneralEnvelope#GeneralEnvelope(CharSequence) GeneralEnvelope}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
index ff20de3640..2209d4314c 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java
@@ -91,9 +91,9 @@ public class DirectPosition1D extends AbstractDirectPosition implements Serializ
      * <cite>Well Known Text</cite> (WKT) format. The given string is typically a {@code POINT}
      * element like below:
      *
-     * {@preformat wkt
-     *     POINT(6)
-     * }
+     * {@snippet lang="wkt" :
+     *   POINT(6)
+     *   }
      *
      * @param  wkt  the {@code POINT} or other kind of element to parse.
      * @throws IllegalArgumentException if the given string cannot be parsed.
@@ -212,9 +212,9 @@ public class DirectPosition1D extends AbstractDirectPosition implements Serializ
      * Formats this position in the <cite>Well Known Text</cite> (WKT) format.
      * The output is like below:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POINT(coordinate)
-     * }
+     *   }
      *
      * The string returned by this method can be {@linkplain #DirectPosition1D(CharSequence) parsed}
      * by the {@code DirectPosition1D} constructor.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
index 62cd3e0c1f..b0e0d878e1 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
@@ -161,9 +161,9 @@ public class DirectPosition2D extends Point2D.Double implements DirectPosition,
      * <cite>Well Known Text</cite> (WKT) format. The given string is typically a {@code POINT}
      * element like below:
      *
-     * {@preformat wkt
-     *     POINT(6 10)
-     * }
+     * {@snippet lang="wkt" :
+     *   POINT(6 10)
+     *   }
      *
      * @param  wkt  the {@code POINT} or other kind of element to parse.
      * @throws IllegalArgumentException if the given string cannot be parsed.
@@ -295,9 +295,9 @@ public class DirectPosition2D extends Point2D.Double implements DirectPosition,
      * Formats this position in the <cite>Well Known Text</cite> (WKT) format.
      * The output is like below:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POINT(x y)
-     * }
+     *   }
      *
      * The string returned by this method can be {@linkplain #DirectPosition2D(CharSequence) parsed}
      * by the {@code DirectPosition2D} constructor.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
index e9d8a34c6e..f571739e69 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
@@ -1182,9 +1182,9 @@ public class Envelope2D extends Rectangle2D.Double implements Envelope, Emptiabl
      * lower corner}{@code ,}{@linkplain #getUpperCorner() upper corner}{@code )}".
      * Example:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   BOX(-90 -180, 90 180)
-     * }
+     *   }
      *
      * @see Envelopes#toString(Envelope)
      */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
index ff84a23f51..5b8900896e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
@@ -144,9 +144,9 @@ public class GeneralDirectPosition extends AbstractDirectPosition implements Ser
      * from the given string in <cite>Well Known Text</cite> (WKT) format.
      * The given string is typically a {@code POINT} element like below:
      *
-     * {@preformat wkt
-     *     POINT(6 10)
-     * }
+     * {@snippet lang="wkt" :
+     *   POINT(6 10)
+     *   }
      *
      * However, this constructor is lenient to other types like {@code POINT ZM}.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
index 23f3b3af19..428399538f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
@@ -227,9 +227,9 @@ public class GeneralEnvelope extends ArrayEnvelope implements Cloneable, Seriali
      * {@code BOX} or <cite>Well Known Text</cite> (WKT) format. The given string is typically
      * a {@code BOX} element like below:
      *
-     * {@preformat wkt
-     *     BOX(-180 -90, 180 90)
-     * }
+     * {@snippet lang="wkt" :
+     *   BOX(-180 -90, 180 90)
+     *   }
      *
      * However, this constructor is lenient to other geometry types like {@code POLYGON}.
      * Actually this constructor ignores the geometry type and just applies the following
@@ -984,11 +984,11 @@ public class GeneralEnvelope extends ArrayEnvelope implements Cloneable, Seriali
      * as a result of this method call. If such effect is undesirable, then this method may be
      * combined with {@link #simplify()} as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (envelope.normalize()) {
      *         envelope.simplify();
      *     }
-     * }
+     *     }
      *
      * <h4>Choosing the range of longitude values</h4>
      * Geographic CRS typically have longitude values in the [-180 … +180]° range, but the [0 … 360]°
@@ -1244,15 +1244,15 @@ public class GeneralEnvelope extends ArrayEnvelope implements Cloneable, Seriali
      * For example, in order to expand only the horizontal component of a four dimensional
      * (<var>x</var>,<var>y</var>,<var>z</var>,<var>t</var>) envelope, one can use:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     envelope.subEnvelope(0, 2).add(myPosition2D);
-     * }
+     *     }
      *
      * If the sub-envelope needs to be independent from the original envelope, use the following idiom:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     GeneralEnvelope copy = envelope.subEnvelope(0, 2).clone();
-     * }
+     *     }
      *
      * The sub-envelope is initialized with a {@code null} {@linkplain #getCoordinateReferenceSystem() CRS}.
      * This method does not compute a sub-CRS because it may not be needed, or the sub-CRS may be already
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
index 13472deebe..c304b8062b 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
@@ -138,9 +138,9 @@ public final class ImmutableEnvelope extends ArrayEnvelope implements Serializab
      * {@code BOX} or <cite>Well Known Text</cite> (WKT) format. The given string is typically
      * a {@code BOX} element like below:
      *
-     * {@preformat wkt
-     *     BOX(-180 -90, 180 90)
-     * }
+     * {@snippet lang="wkt" :
+     *   BOX(-180 -90, 180 90)
+     *   }
      *
      * However, this constructor is lenient to other geometry types like {@code POLYGON}.
      * See the javadoc of the {@link GeneralEnvelope#GeneralEnvelope(CharSequence) GeneralEnvelope}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/WraparoundMethod.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/WraparoundMethod.java
index 2e562562d1..b6f4a42b6e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/WraparoundMethod.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/WraparoundMethod.java
@@ -65,9 +65,9 @@ public enum WraparoundMethod {
      * given the {@code BBOX(+170 0, -170 1)} envelope, a polygon created from the 4 corners
      * and ignoring the fact that the envelope crosses the anti-meridian may be as below:</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POLYGON(+170 0, -170 0, -170 1, +170 1, +170 0)
-     * }
+     *   }
      */
     NONE,
 
@@ -100,9 +100,9 @@ public enum WraparoundMethod {
      * given the {@code BBOX(+170 0, -170 1)} envelope,
      * a polygon created after shifting the "upper" corner (-170 1) may be as below:</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POLYGON(+170 0, +190 0, +190 1, +170 1, +170 0)
-     * }
+     *   }
      */
     CONTIGUOUS_UPPER,
 
@@ -117,9 +117,9 @@ public enum WraparoundMethod {
      * given the {@code BBOX(+170 0, -170 1)} envelope,
      * a polygon created after shifting the "lower" corner (+170 0) may be as below:</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POLYGON(-190 0, -170 0, -170 1, -190 1, -190 0)
-     * }
+     *   }
      */
     CONTIGUOUS_LOWER,
 
@@ -142,9 +142,9 @@ public enum WraparoundMethod {
      * given the {@code BBOX(+170 0, -170 1)} envelope,
      * a polygon created after expanding the envelope may be as below:</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   POLYGON(-180 0, +180 0, +180 1, -180 1, -180 0)
-     * }
+     *   }
      *
      * @see GeneralEnvelope#simplify()
      */
@@ -161,11 +161,11 @@ public enum WraparoundMethod {
      * given the {@code BBOX(+170 0, -170 1)} envelope,
      * polygons created after splitting the envelope may be as below:</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   MULTI-POLYGON(
      *       (-180 0,  -170 0,  -170 1,  -180 1,  -180 0)
      *       (+170 0,  +180 0,  +180 1,  +170 1,  +170 0))
-     * }
+     *   }
      *
      * @see GeneralEnvelope#toSimpleEnvelopes()
      */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java
index d8bf8139f2..5948c9c1db 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/RS_Identifier.java
@@ -32,21 +32,21 @@ import org.opengis.metadata.Identifier;
  * <h2>Marshalling</h2>
  * Identifiers are typically marshalled as below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gml:identifier codeSpace="EPSG">4326</gml:identifier>
  * }
  *
  * If the {@code Identifier} to marshal contains a {@linkplain Identifier#getVersion() version},
  * then this adapter concatenates the version to the codespace in a "URI-like" way like below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gml:identifier codeSpace="EPSG:8.3">4326</gml:identifier>
  * }
  *
  * <h2>Unmarshalling</h2>
  * Some data producers put a URN instead of a simple code value, as in the example below:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>
  * }
  *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java
index b428fdba79..97f135cb4b 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/SecondDefiningParameter.java
@@ -43,7 +43,7 @@ public final class SecondDefiningParameter {
      * Nested parameter, for JAXB purpose.
      * This is used for marshalling XML like below:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:secondDefiningParameter>
      *     <gml:SecondDefiningParameter>
      *       <gml:semiMinorAxis uom="urn:ogc:def:uom:EPSG::9001">6371007</gml:semiMinorAxis>
@@ -58,7 +58,7 @@ public final class SecondDefiningParameter {
      * Whether the ellipsoid is a sphere, or {@code null} if unspecified.
      * If this value is {@code true}, then the XML shall be marshalled like below:
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:secondDefiningParameter>
      *     <gml:SecondDefiningParameter>
      *       <gml:isSphere>true</gml:isSphere>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ExtentSelector.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ExtentSelector.java
index 19191f1ded..d52ae917e1 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ExtentSelector.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ExtentSelector.java
@@ -69,13 +69,13 @@ import org.apache.sis.util.resources.Errors;
  * <h2>Usage</h2>
  * Example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     ExtentSelector<Foo> selector = new ExtentSelector<>(areaOfInterest);
  *     for (Foo candidate : candidates) {
  *         selector.evaluate(candidate.extent, candidate),
  *     }
  *     Foo best = selector.best();
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.3
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
index e7472718cb..9da359e2af 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
@@ -254,9 +254,9 @@ public final class Formulas extends Static {
      * broken when x=0 and |y| ≤ 1.4914711209038602E-154 or conversely. This method does not check for such cases;
      * it is caller responsibility to add this check is necessary, for example as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     double D = max(fastHypot(x, y), max(abs(x), abs(y)));
-     * }
+     *     }
      *
      * According JMH, above check is 1.65 time slower than {@code fastHypot} without checks.
      * We define this {@code fastHypot(…)} method for tracing where {@code sqrt(x² + y²)} is used,
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
index f851379ffb..e8d8cd9ff7 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/GeodeticObjectBuilder.java
@@ -302,9 +302,9 @@ public class GeodeticObjectBuilder extends Builder<GeodeticObjectBuilder> {
      * is a parameter value of the old projection and {@code target} is the group of parameters where to set
      * the values for new projection. If {@code mapper} is null, then the default implementation is as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     target.getOrCreate(source.getDescriptor()).setValue(source.getValue());
-     * }
+     *     }
      *
      * @param  newMethod  name of the new operation method, or {@code null} if no change.
      * @param  mapper     mapper from old parameters to new parameters, or {@code null} for verbatim copy.
@@ -441,25 +441,24 @@ public class GeodeticObjectBuilder extends Builder<GeodeticObjectBuilder> {
     /**
      * Creates a projected CRS using a conversion built from the values given by the {@code setParameter(…)} calls.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * The following example creates a projected CRS for the <cite>"NTF (Paris) / Lambert zone II"</cite> projection,
      * from a base CRS which is presumed to already exists in this example.
      *
-     * {@preformat java
-     *   GeodeticObjectBuilder builder = new GeodeticObjectBuilder();
-     *   GeographicCRS baseCRS = ...;
-     *   CartesianCS derivedCS = ...;
-     *   ProjectedCRS crs = builder
-     *           .setConversionMethod("Lambert Conic Conformal (1SP)")
-     *           .setConversionName("Lambert zone II")
-     *           .setParameter("Latitude of natural origin",             52, Units.GRAD)
-     *           .setParameter("Scale factor at natural origin", 0.99987742, Units.UNITY)
-     *           .setParameter("False easting",                      600000, Units.METRE)
-     *           .setParameter("False northing",                    2200000, Units.METRE)
-     *           .addName("NTF (Paris) / Lambert zone II")
-     *           .createProjectedCRS(baseCRS, derivedCS);
-     * }
-     * </div>
+     * {@snippet lang="java" :
+     *     var builder = new GeodeticObjectBuilder();
+     *     GeographicCRS baseCRS = ...;
+     *     CartesianCS derivedCS = ...;
+     *     ProjectedCRS crs = builder
+     *             .setConversionMethod("Lambert Conic Conformal (1SP)")
+     *             .setConversionName("Lambert zone II")
+     *             .setParameter("Latitude of natural origin",             52, Units.GRAD)
+     *             .setParameter("Scale factor at natural origin", 0.99987742, Units.UNITY)
+     *             .setParameter("False easting",                      600000, Units.METRE)
+     *             .setParameter("False northing",                    2200000, Units.METRE)
+     *             .addName("NTF (Paris) / Lambert zone II")
+     *             .createProjectedCRS(baseCRS, derivedCS);
+     *     }
      *
      * @param  baseCRS    coordinate reference system to base the derived CRS on.
      * @param  derivedCS  the coordinate system for the derived CRS, or {@code null} for the default.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Legacy.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Legacy.java
index 914dccf316..b534bd65c6 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Legacy.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Legacy.java
@@ -48,9 +48,9 @@ public final class Legacy {
      * A three-dimensional Cartesian CS with the legacy set of geocentric axes.
      * OGC 01-009 defines the default geocentric axes as:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   AXIS[“X”,OTHER], AXIS[“Y”,EAST], AXIS[“Z”,NORTH]
-     * }
+     *   }
      *
      * where the {@code OTHER} axis is toward prime meridian. Those directions and axis names are different than
      * the ISO 19111's ones (ISO names are "Geocentric X", "Geocentric Y" and "Geocentric Z"). This constant uses
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionTransformer.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionTransformer.java
index b4e10bf172..88a12d3f71 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionTransformer.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionTransformer.java
@@ -57,7 +57,7 @@ import org.apache.sis.util.Utilities;
  * For example, suppose that {@code MyClass} needs to perform its internal working in some particular CRS,
  * but we want robust API accepting whatever CRS the client uses. {@code MyClass} can be written as below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public class MyClass {
  *         private static final CoordinateReferenceSystem PUBLIC_CRS = ...
  *         private static final CoordinateReferenceSystem INTERNAL_CRS = ...
@@ -74,7 +74,7 @@ import org.apache.sis.util.Utilities;
  *             return myPosition.inverseTransform(PUBLIC_CRS);
  *         }
  *     }
- * }
+ *     }
  *
  * This class is not thread-safe.
  *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/IntervalRectangle.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/IntervalRectangle.java
index 7f7c98ff7a..5cd42560a1 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/IntervalRectangle.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/IntervalRectangle.java
@@ -82,15 +82,15 @@ public class IntervalRectangle extends Rectangle2D {
      * full longitude range (i.e. this constructor does not preserve the convention of using
      * negative width for envelopes crossing anti-meridian).
      *
-     * <div class="note"><b>Note:</b> this constructor expands envelopes that cross the anti-meridian
+     * <h4>Design note</h4>
+     * This constructor expands envelopes that cross the anti-meridian
      * because the methods defined in this class are not designed for handling such envelopes.
      * If a rectangle with negative width is nevertheless desired for envelope crossing the anti-meridian,
      * one can use the following constructor:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     new IntervalRectangle(envelope.getLowerCorner(), envelope.getUpperCorner());
-     * }
-     * </div>
+     *     }
      *
      * @param envelope  the envelope from which to copy the values.
      */
@@ -467,9 +467,9 @@ public class IntervalRectangle extends Rectangle2D {
      * Invoking this method is equivalent to invoking the following code, except that this
      * method behaves correctly with infinite values and {@link Envelope2D} implementation.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Rectangle2D.intersect(this, rect, this);
-     * }
+     *     }
      *
      * @param  rect  the {@code Rectangle2D} to intersect with this rectangle.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/Tile.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/Tile.java
index ca8cdf69fa..b5dddfcc2d 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/Tile.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/Tile.java
@@ -427,17 +427,16 @@ public class Tile implements Serializable {
      * since it may have been {@linkplain AffineTransform#translate(double, double) translated}
      * in order to get a uniform grid geometry for every tiles.
      *
-     * <div class="note"><b>Tip:</b>
+     * <h4>Tip</h4>
      * the <a href="https://en.wikipedia.org/wiki/World_file">World File</a> coefficients of this tile
      * (i.e. the <cite>grid to CRS</cite> transform that we would have if the pixel in the upper-left
      * corner always had indices (0,0)) can be computed as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Point location = tile.getLocation();
      *     AffineTransform gridToCRS = new AffineTransform(tile.getGridToCRS());
      *     gridToCRS.translate(location.x, location.y);
-     * }
-     * </div>
+     *     }
      *
      * @return the <cite>"grid to real world"</cite> transform mapping pixel
      *         {@linkplain PixelOrientation#UPPER_LEFT upper left} corner, or {@code null} if undefined.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Element.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Element.java
index 90ed2cc72a..83c70e7097 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Element.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Element.java
@@ -139,20 +139,20 @@ final class Element {
      * This wrapper is a convenience for branching on different codes depending on
      * the keyword value. For example:
      *
-     * {@preformat java
-     *    Element wrapper = new Element(an_element_with_unknown_keyword);
-     *    Element e = wrapper.pullElement(…, "ProjectedCRS");
-     *    if (e != null) {
-     *        // Do something specific to projected CRS.
-     *        return;
-     *    }
-     *    e = wrapper.pullElement(…, "GeographicCRS");
-     *    if (e != null) {
-     *        // Do something specific to Geographic CRS.
-     *        return;
-     *    }
-     *    // etc.
-     * }
+     * {@snippet lang="java" :
+     *     Element wrapper = new Element(an_element_with_unknown_keyword);
+     *     Element e = wrapper.pullElement(…, "ProjectedCRS");
+     *     if (e != null) {
+     *         // Do something specific to projected CRS.
+     *         return;
+     *     }
+     *     e = wrapper.pullElement(…, "GeographicCRS");
+     *     if (e != null) {
+     *         // Do something specific to Geographic CRS.
+     *         return;
+     *     }
+     *     // etc.
+     *     }
      *
      * @param  singleton  the only child for this root.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java
index 8ac4b233fa..e28df8c1b7 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java
@@ -1599,9 +1599,9 @@ public class Formatter implements Localized {
      * Invoking this method is equivalent to first verifying the {@code other} class,
      * then delegating as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return other.formatTo(this);
-     * }
+     *     }
      *
      * This method is useful for {@code FormattableObject} which are wrapper around another object.
      * It allows to delegate the WKT formatting to the wrapped object.
@@ -1678,11 +1678,11 @@ public class Formatter implements Localized {
      * Restores the contextual unit to its previous state before the call to {@link #addContextualUnit(Unit)}.
      * This method is used in the following pattern:
      *
-     * {@preformat java
-     *   final Unit<?> previous = formatter.addContextualUnit(unit);
-     *   // ... format some WKT elements here.
-     *   formatter.restoreContextualUnit(unit, previous);
-     * }
+     * {@snippet lang="java" :
+     *     final Unit<?> previous = formatter.addContextualUnit(unit);
+     *     // ... format some WKT elements here.
+     *     formatter.restoreContextualUnit(unit, previous);
+     *     }
      *
      * @param  unit      the value given in argument to {@code addContextualUnit(unit)} (can be {@code null}).
      * @param  previous  the value returned by {@code addContextualUnit(unit)} (can be {@code null}).
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
index f3aa4afcf8..e595bfd8df 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
@@ -395,9 +395,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      * This includes elements like {@code "SCOPE"}, {@code "ID"} (WKT 2) or {@code "AUTHORITY"} (WKT 1).
      * This WKT 1 element has the following pattern:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     AUTHORITY["<name>", "<code>"]
-     * }
+     *     }
      *
      * <h4>Fallback</h4>
      * The name is a mandatory property, but some invalid WKT with an empty string exist. In such case,
@@ -583,9 +583,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      * Parses an optional {@code "UNIT"} element of a known dimension.
      * This element has the following pattern:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     UNIT["<name>", <conversion factor> {,<authority>}]
-     * }
+     *     }
      *
      * Unit was a mandatory element in WKT 1, but became optional in WKT 2 because the unit may be specified
      * in each {@code AXIS[…]} element instead of for the whole coordinate system.
@@ -657,12 +657,12 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      * Parses a {@code "CS"} element followed by all {@code "AXIS"} elements.
      * This element has the following pattern (simplified):
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     CS["<type>", dimension],
      *     AXIS["<name>", NORTH | SOUTH | EAST | WEST | UP | DOWN | OTHER],
      *     UNIT["<name>", <conversion factor>],
      *     etc.
-     * }
+     *     }
      *
      * This element is different from all other elements parsed by {@code GeodeticObjectParser}
      * in that its components are sibling elements rather than child elements of the CS element.
@@ -986,15 +986,15 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      * Parses an {@code "AXIS"} element.
      * This element has the following pattern (simplified):
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     AXIS["<name (abbr.)>", NORTH | SOUTH | EAST | WEST | UP | DOWN | OTHER, ORDER[n], UNIT[…], ID[…]]
-     * }
+     *     }
      *
      * Abbreviation may be specified between parenthesis. Nested parenthesis are possible, as for example:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     AXIS["Easting (E(X))", EAST]
-     * }
+     *     }
      *
      * @param  mode         {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent       the parent element.
@@ -1130,9 +1130,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 pattern was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     PRIMEM["<name>", <longitude> {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode         {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent       the parent element.
@@ -1173,9 +1173,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      * Parses an <strong>optional</strong> {@code "TOWGS84"} element.
      * This element is specific to WKT 1 and has the following pattern:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     TOWGS84[<dx>, <dy>, <dz>, <ex>, <ey>, <ez>, <ppm>]
-     * }
+     *     }
      *
      * @param  mode    {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent  the parent element.
@@ -1207,9 +1207,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 pattern was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     SPHEROID["<name>", <semi-major axis>, <inverse flattening> {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode    {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent  the parent element.
@@ -1312,9 +1312,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 specification was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     PROJECTION["<name>" {,<authority>}]
-     * }
+     *     }
      *
      * Note that in WKT 2, this element is wrapped inside a {@code Conversion} or {@code DerivingConversion}
      * element which is itself inside the {@code ProjectedCRS} element. This is different than WKT 1, which
@@ -1387,9 +1387,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 pattern was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     DATUM["<name>", <spheroid> {,<to wgs84>} {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode      {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent    the parent element.
@@ -1428,9 +1428,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 pattern was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     VERT_DATUM["<name>", <datum type> {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode    {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent  the parent element.
@@ -1467,9 +1467,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
     /**
      * Parses a {@code "TimeDatum"} element. This element has the following pattern:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     TimeDatum["<name>", TimeOrigin[<time origin>] {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode    {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent  the parent element.
@@ -1496,9 +1496,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
     /**
      * Parses a {@code "ParametricDatum"} element. This element has the following pattern:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     ParametricDatum["<name>", Anchor[...] {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode    {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent  the parent element.
@@ -1525,9 +1525,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 pattern was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     LOCAL_DATUM["<name>", <datum type> {,<authority>}]
-     * }
+     *     }
      *
      * The datum type (WKT 1 only) is currently ignored.
      *
@@ -1588,9 +1588,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 pattern was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     LOCAL_CS["<name>", <local datum>, <unit>, <axis>, {,<axis>}* {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode       {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent     the parent element.
@@ -1698,15 +1698,15 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 specification had two elements for this:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     GEOGCS["<name>", <datum>, <prime meridian>, <angular unit>  {,<twin axes>} {,<authority>}]
-     * }
+     *     }
      *
      * and
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     GEOCCS["<name>", <datum>, <prime meridian>, <linear unit> {,<axis> ,<axis> ,<axis>} {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode       {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent     the parent element.
@@ -1873,9 +1873,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 pattern was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     VERT_CS["<name>", <vert datum>, <linear unit>, {<axis>,} {,<authority>}]
-     * }
+     *     }
      *
      * @param  mode       {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent     the parent element.
@@ -2089,10 +2089,10 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 specification was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     PROJCS["<name>", <geographic cs>, <projection>, {<parameter>,}*,
      *            <linear unit> {,<twin axes>}{,<authority>}]
-     * }
+     *     }
      *
      * @param  mode       {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent     the parent element.
@@ -2172,9 +2172,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      *
      * The legacy WKT 1 specification was:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     COMPD_CS["<name>", <head cs>, <tail cs> {,<authority>}]
-     * }
+     *     }
      *
      * In the particular case where there is a geographic CRS and an ellipsoidal height,
      * this method rather build a three-dimensional geographic CRS.
@@ -2208,9 +2208,9 @@ class GeodeticObjectParser extends MathTransformParser implements Comparator<Coo
      * Parses a {@code "FITTED_CS"} element.
      * This element has the following pattern:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *     FITTED_CS["<name>", <to base>, <base cs>]
-     * }
+     *     }
      *
      * @param  mode    {@link #FIRST}, {@link #OPTIONAL} or {@link #MANDATORY}.
      * @param  parent  the parent element.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/StoredTree.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/StoredTree.java
index a38a706649..38d6bf9b08 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/StoredTree.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/StoredTree.java
@@ -305,12 +305,12 @@ final class StoredTree implements Serializable {
      * where we need to allow more roots: when user wants to represent a coordinate system.
      * A WKT 2 coordinate system looks like:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   CS[Cartesian, 2],
      *     Axis["Easting (E)", east],
      *     Axis["Northing (N)", north],
      *     Unit["metre", 1]
-     * }
+     *   }
      *
      * While axes are conceptually parts of coordinate system, they are not declared inside the {@code CS[…]}
      * element for historical reasons (for compatibility with WKT 1). For representing such "flattened tree",
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java
index dc5cc5735e..b88cc0ea4b 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Symbols.java
@@ -352,13 +352,13 @@ public class Symbols implements Localized, Cloneable, Serializable {
      * Each string shall contain exactly two code points (usually two characters).
      * The first code point is taken as the opening bracket, and the second code point as the closing bracket.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * The following code will instruct the WKT formatter to use the (…) pair of brackets at formatting time,
      * but still accept the more common […] pair of brackets at parsing time:
      *
-     * {@preformat java
-     *   symbols.setPairedBrackets("()", "[]");
-     * }</div>
+     * {@snippet lang="java" :
+     *     symbols.setPairedBrackets("()", "[]");
+     *     }
      *
      * @param  preferred     the preferred pair of opening and closing quotes, used at formatting time.
      * @param  alternatives  alternative pairs of opening and closing quotes accepted at parsing time.
@@ -430,14 +430,14 @@ public class Symbols implements Localized, Cloneable, Serializable {
      * Each string shall contain exactly two code points (usually two characters).
      * The first code point is taken as the opening quote, and the second code point as the closing quote.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * The following code will instruct the WKT formatter to use the prettier “…” quotation marks at formatting time
      * (especially useful for {@code String} constants in Java code), but still accept the standard "…" quotation marks
      * at parsing time:
      *
-     * {@preformat java
-     *   symbols.setPairedQuotes("“”", "\"\"");
-     * }</div>
+     * {@snippet lang="java" :
+     *     symbols.setPairedQuotes("“”", "\"\"");
+     *     }
      *
      * @param  preferred     the preferred pair of opening and closing quotes, used at formatting time.
      * @param  alternatives  alternative pairs of opening and closing quotes accepted at parsing time.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/VerticalInfo.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/VerticalInfo.java
index d62c5db8a5..7a3adcec8b 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/VerticalInfo.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/VerticalInfo.java
@@ -37,9 +37,9 @@ import org.apache.sis.metadata.iso.extent.DefaultVerticalExtent;
  * Stores temporary information needed for completing the construction of an {@link DefaultVerticalExtent} instance.
  * WKT of vertical extents looks like:
  *
- * {@preformat wkt
+ * {@snippet lang="wkt" :
  *     VERTICALEXTENT[-1000, 0, LENGTHUNIT[“metre”, 1]]
- * }
+ *     }
  *
  * But {@code DefaultVerticalExtent} has no {@code unit} property. Instead, {@code DefaultVerticalExtent} has a
  * {@code verticalCRS} property. The WKT specification said that heights are positive toward up and relative to
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTDictionary.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTDictionary.java
index e7ac6de1f3..4ca865cd27 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTDictionary.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTDictionary.java
@@ -88,7 +88,7 @@ import org.apache.sis.util.SimpleInternationalString;
  * The additional CRS are defined by Well-Known Text strings in a {@code "MyCRS.txt"} file.
  * First step is to create a CRS factory with those definitions:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public final class MyCRS extends WKTDictionary implements CRSAuthorityFactory {
  *         MyCRS() throws IOException, FactoryException {
  *             super(new DefaultCitation("MyAuthority"));
@@ -97,7 +97,7 @@ import org.apache.sis.util.SimpleInternationalString;
  *             }
  *         }
  *     }
- * }
+ *     }
  *
  * The second step is to register this factory as a service with a
  * {@code META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory} file on the classpath.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
index 4a3c80389c..3c0c69c038 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
@@ -771,20 +771,19 @@ public class WKTFormat extends CompoundFormat<Object> {
      * Adds a fragment of Well Know Text (WKT). The {@code wkt} argument given to this method
      * can contains itself other fragments specified in some previous calls to this method.
      *
-     * <div class="note"><b>Example</b>
-     * if the following method is invoked:
+     * <h4>Example</h4>
+     * If the following method is invoked:
      *
-     * {@preformat java
-     *   addFragment("MyEllipsoid", "Ellipsoid[“Bessel 1841”, 6377397.155, 299.1528128, ID[“EPSG”,“7004”]]");
-     * }
+     * {@snippet lang="java" :
+     *     addFragment("MyEllipsoid", "Ellipsoid[“Bessel 1841”, 6377397.155, 299.1528128, ID[“EPSG”,“7004”]]");
+     *     }
      *
      * Then other WKT strings parsed by this {@code WKTFormat} instance can refer to the above fragment as below
      * (WKT after the ellipsoid omitted for brevity):
      *
-     * {@preformat java
-     *   Object crs = parseObject("GeodeticCRS[“Tokyo”, Datum[“Tokyo”, $MyEllipsoid], …]");
-     * }
-     * </div>
+     * {@snippet lang="java" :
+     *     Object crs = parseObject("GeodeticCRS[“Tokyo”, Datum[“Tokyo”, $MyEllipsoid], …]");
+     *     }
      *
      * For removing a fragment, use <code>{@linkplain #getFragmentNames()}.remove(name)</code>.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Warnings.java b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Warnings.java
index 35d7745648..e53c1416ee 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Warnings.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Warnings.java
@@ -50,13 +50,13 @@ import org.apache.sis.util.resources.Vocabulary;
  *
  * <div class="note"><b>Example:</b> after parsing the following WKT:
  *
- * {@preformat wkt
+ * {@snippet lang="wkt" :
  *   GeographicCRS[“WGS 84”,
  *     Datum[“World Geodetic System 1984”,
  *       Ellipsoid[“WGS84”, 6378137.0, 298.257223563, Intruder[“some text here”]]],
  *       PrimeMeridian[“Greenwich”, 0.0, Intruder[“other text here”]],
  *     AngularUnit[“degree”, 0.017453292519943295]]
- * }
+ *   }
  *
  * a call to {@link WKTFormat#getWarnings()} would return a {@code Warnings} instance with the following information:
  *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
index 6df857e380..3a0b072a3d 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
@@ -593,7 +593,7 @@ public class DefaultParameterDescriptor<T> extends AbstractParameterDescriptor i
      * the parameter value element, like below. In such case, {@link #valueClass} is defined at construction time
      * by {@link #DefaultParameterDescriptor()} because the value is before the descriptor.
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:ParameterValue>
      *     <gml:value uom="…">…</gml:value>
      *     <gml:operationParameter>
@@ -602,18 +602,18 @@ public class DefaultParameterDescriptor<T> extends AbstractParameterDescriptor i
      *       </gml:OperationParameter>
      *     </gml:operationParameter>
      *   </gml:ParameterValue>
-     * }
+     *   }
      *
      * In the second scenario shows below, the descriptor was defined before the value and is referenced by a link.
      * In that case, {@link #valueClass} is {@code null} the first time that this method is invoked. It may become
      * non-null if the same parameter descriptor is reused for many parameter values.
      *
-     * {@preformat xml
+     * {@snippet lang="xml" :
      *   <gml:ParameterValue>
      *     <gml:value uom="…">…</gml:value>
      *     <gml:operationParameter xlink:href="#LongitudeRotation"/>
      *   </gml:ParameterValue>
-     * }
+     *   }
      *
      * This method modifies the state of this class despite the fact that it should be immutable.
      * It is okay because we are updating an instance created during GML unmarshalling, and that
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
index 6c42e7b59c..358d8c64fc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
@@ -56,11 +56,11 @@ import static org.apache.sis.util.Utilities.deepEquals;
  * If nevertheless a {@code ParameterDescriptorGroup} needs to be instantiated directly,
  * then the {@link ParameterBuilder} class may make the task easier.
  *
- * <div class="note"><b>Example:</b>
+ * <h2>Example</h2>
  * The following example declares the parameters for a <cite>Mercator (variant A)</cite> projection method
  * valid from 80°S to 84°N on all the longitude range (±180°).
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     class Mercator {
  *         static final ParameterDescriptorGroup PARAMETERS;
  *         static {
@@ -80,8 +80,7 @@ import static org.apache.sis.util.Utilities.deepEquals;
  *             PARAMETERS = builder.createGroup(parameters);
  *         }
  *     }
- * }
- * </div>
+ *     }
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Johann Sorel (Geomatys)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
index f900dafc56..43b7d9bef7 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
@@ -93,9 +93,9 @@ import static org.apache.sis.util.Utilities.deepEquals;
  * The type and constraints on parameter values are given by the {@linkplain #getDescriptor() descriptor},
  * which is specified at construction time. The parameter type can be fetch with the following idiom:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Class<T> valueClass = parameter.getDescriptor().getValueClass();
- * }
+ *     }
  *
  * <h2>Instantiation</h2>
  * A {@linkplain DefaultParameterDescriptor parameter descriptor} must be defined before parameter value can be created.
@@ -857,9 +857,9 @@ convert:            if (componentType != null) {
      * Compares the specified object with this parameter for equality.
      * This method is implemented as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return equals(other, ComparisonMode.STRICT);
-     * }
+     *     }
      *
      * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead of this method.
      *
@@ -942,9 +942,9 @@ convert:            if (componentType != null) {
      * Formats this parameter as a <cite>Well Known Text</cite> {@code Parameter[…]} element.
      * Example:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   Parameter["False easting", 0.0, LengthUnit["metre", 1]]
-     * }
+     *   }
      *
      * <h4>Unit of measurement</h4>
      * The units of measurement were never specified in WKT 1 format, and are optional in WKT 2 format.
@@ -960,7 +960,7 @@ convert:            if (componentType != null) {
      * parameters, which are in kilometres in this example.
      *
      * <p><b>WKT 1:</b></p>
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   PROJCS[…,
      *     GEOGCS[…,
      *       UNIT[“grad”, 0.015707963267948967]],       // Unit for all angles
@@ -970,10 +970,10 @@ convert:            if (componentType != null) {
      *     PARAMETER[“false_easting”, 600.0],           // In kilometres
      *     PARAMETER[“false_northing”, 2200.0],         // In kilometres
      *     UNIT[“kilometre”, 1000]]                     // Unit for all lengths
-     * }
+     *   }
      *
      * <p><b>WKT 2:</b></p>
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   ProjectedCRS[…
      *     BaseGeodCRS[…
      *       AngleUnit[“grad”, 0.015707963267948967]],
@@ -985,7 +985,7 @@ convert:            if (componentType != null) {
      *       Parameter[“False northing”, 2200.0]],
      *     CS[“Cartesian”, 2],
      *       LengthUnit[“kilometre”, 1000]]
-     * }
+     *   }
      * </div>
      *
      * @param  formatter  the formatter where to format the inner content of this WKT element.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
index 908ab5c746..d4aec7fd5b 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
@@ -71,29 +71,28 @@ import org.apache.sis.util.Utilities;
  * be invoked regardless of whether the parameter is mandatory or optional: if the parameter was optional and not
  * yet present in this group, it will be created.
  *
- * <div class="note"><b>Example:</b>
+ * <h3>Example 1</h3>
  * Assuming the descriptor defined in the {@link DefaultParameterDescriptorGroup} example,
  * one can set <cite>Mercator (variant A)</cite> projection parameters as below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     ParameterValueGroup mercator = Mercator.PARAMETERS.createValue();
  *     mercator.parameter("Longitude of natural origin").setValue(-60, Units.DEGREE);  // 60°W
  *     mercator.parameter("Latitude of natural origin") .setValue( 40, Units.DEGREE);  // 40°N
  *     // Keep default values for other parameters.
- * }
- * </div>
+ *     }
  *
+ * <h3>Example 2</h3>
  * Alternatively, if all parameters were created elsewhere and the user wants to copy them in a new
  * parameter group, the {@link List#addAll(Collection)} method can be invoked on the values list.
  *
- * <div class="note"><b>Example:</b>
- * {@preformat java
+ * {@snippet lang="java" :
  *     ParameterValue<?>[] parameter = ...;        // Defined elsewhere.
  *     ParameterValueGroup mercator = Mercator.PARAMETERS.createValue();
  *     Collections.addAll(mercator.values(), parameters);
- * }
- * </div>
+ *     }
  *
+ * <h2>Removing elements</h2>
  * Optional parameters can be removed by the usual {@link List#remove(int)} or {@link List#remove(Object)}
  * operations on the values list. But attempts to remove a mandatory parameter will cause an
  * {@link InvalidParameterCardinalityException} to be thrown.
@@ -263,11 +262,11 @@ public class DefaultParameterValueGroup extends Parameters implements LenientCom
      * For example, the following idiom fetches a floating point value for the <cite>False easting</cite>
      * and <cite>False northing</cite> parameters and set a new value for the <cite>False easting</cite> one:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     double easting  = parameter("False easting" ).doubleValue();
      *     double northing = parameter("False northing").doubleValue();
      *     parameter("False easting").setValue(500000.0);
-     * }
+     *     }
      *
      * <div class="note"><b>API note:</b> there is no <code>parameter<b><u>s</u></b>(String)</code> method
      * returning a list of parameter values because the ISO 19111 standard fixes the {@code ParameterValue}
@@ -495,9 +494,9 @@ scan:   for (final GeneralParameterValue param : actual.values()) {
      * Compares the specified object with this parameter for equality.
      * This method is implemented as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return equals(other, ComparisonMode.STRICT);
-     * }
+     *     }
      *
      * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead of this method.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
index ec4fd2e263..f755c33242 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
@@ -65,42 +65,47 @@ import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
  * In this example, the <cite>"Longitude of natural origin"</cite> parameter is giving different aliases
  * for illustrating the case of different software libraries or standards using different conventions.
  *
- * {@preformat java
- *   ParameterBuilder builder = new ParameterBuilder();
- *   builder.setCodeSpace(Citations.EPSG, "EPSG")                   // The default namespace to be used below.
- *          .setRequired(true);                                     // All parameters will be considered mandatory.
+ * {@snippet lang="java" :
+ * public class MyOperation {
+ *     public static final ParameterDescriptorGroup PARAMETERS;
+ *     static {
+ *         ParameterBuilder builder = new ParameterBuilder();
+ *         builder.setCodeSpace(Citations.EPSG, "EPSG")                   // The default namespace to be used below.
+ *                .setRequired(true);                                     // All parameters will be considered mandatory.
  *
- *   // Constructs the list of parameters.
- *   ParameterDescriptor<?>[] parameters = {
- *       builder.addName("Latitude of natural origin")              // Name in the default namespace ("EPSG" in this example).
- *              .createBounded( -80,  +84, 0, Units.DEGREE),        // Latitude of Mercator projection cannot go to the poles.
+ *         // Constructs the list of parameters.
+ *         ParameterDescriptor<?>[] parameters = {
+ *             builder.addName("Latitude of natural origin")              // Name in the default namespace ("EPSG" in this example).
+ *                    .createBounded( -80,  +84, 0, Units.DEGREE),        // Latitude of Mercator projection cannot go to the poles.
  *
- *       builder.addIdentifier("8802")                              // Primary key in default namespace ("EPSG" in this example).
- *              .addName("Longitude of natural origin")             // Primary name in default namespace ("EPSG" in this example).
- *              .addName(Citations.OGC, "central_meridian")         // First alias in "OGC" namespace.
- *              .addName(Citations.GEOTIFF, "NatOriginLong")        // Second alias in "GeoTIFF" namespace.
- *              .createBounded(-180, +180, 0, Units.DEGREE),        // Projection is valid on all the longitude range (±180°).
+ *             builder.addIdentifier("8802")                              // Primary key in default namespace ("EPSG" in this example).
+ *                    .addName("Longitude of natural origin")             // Primary name in default namespace ("EPSG" in this example).
+ *                    .addName(Citations.OGC, "central_meridian")         // First alias in "OGC" namespace.
+ *                    .addName(Citations.GEOTIFF, "NatOriginLong")        // Second alias in "GeoTIFF" namespace.
+ *                    .createBounded(-180, +180, 0, Units.DEGREE),        // Projection is valid on all the longitude range (±180°).
  *
- *       builder.addName("Scale factor at natural origin")
- *              .createStrictlyPositive(1, Units.UNITY),
+ *             builder.addName("Scale factor at natural origin")
+ *                    .createStrictlyPositive(1, Units.UNITY),
  *
- *       builder.addName("False easting")
- *              .create(0, Units.METRE),
+ *             builder.addName("False easting")
+ *                    .create(0, Units.METRE),
  *
- *       builder.addName("False northing")
- *              .create(0, Units.METRE)
- *   };
+ *             builder.addName("False northing")
+ *                    .create(0, Units.METRE)
+ *         };
  *
- *   // Put all above parameters in a group.
- *   ParameterDescriptorGroup group = builder
- *           .addIdentifier("9804")                                 // Defined in implicit "EPSG" namespace.
- *           .addName      ("Mercator (variant A)")                 // Defined in implicit "EPSG" namespace.
- *           .addName      ("Mercator (1SP)")                       // Defined in implicit "EPSG" namespace.
- *           .addName      (Citations.OGC, "Mercator_1SP")          // "OGC" namespace explicitly shown by toString().
- *           .addName      (Citations.GEOTIFF, "CT_Mercator")       // "GeoTIFF" namespace explicitly shown by toString().
- *           .addIdentifier(Citations.GEOTIFF, "7")
- *           .setRemarks   ("The “Mercator (1SP)” method name was used prior to October 2010.")
- *           .createGroupForMapProjection(parameters);
+ *         // Put all above parameters in a group.
+ *         PARAMETERS = ParameterDescriptorGroup group = builder
+ *                 .addIdentifier("9804")                                 // Defined in implicit "EPSG" namespace.
+ *                 .addName      ("Mercator (variant A)")                 // Defined in implicit "EPSG" namespace.
+ *                 .addName      ("Mercator (1SP)")                       // Defined in implicit "EPSG" namespace.
+ *                 .addName      (Citations.OGC, "Mercator_1SP")          // "OGC" namespace explicitly shown by toString().
+ *                 .addName      (Citations.GEOTIFF, "CT_Mercator")       // "GeoTIFF" namespace explicitly shown by toString().
+ *                 .addIdentifier(Citations.GEOTIFF, "7")
+ *                 .setRemarks   ("The “Mercator (1SP)” method name was used prior to October 2010.")
+ *                 .createGroupForMapProjection(parameters);
+ *     }
+ * }
  * }
  *
  * @author  Martin Desruisseaux (Geomatys)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
index 85aaf2d889..31a564a956 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
@@ -809,9 +809,9 @@ public abstract class Parameters implements ParameterValueGroup, Cloneable {
      *
      * <p>The default implementation is equivalent to:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return cast(parameter(name), parameter.getValueClass());
-     * }
+     *     }
      *
      * where {@code name} is a {@code parameter} {@linkplain DefaultParameterDescriptor#getName() name}
      * or {@linkplain DefaultParameterDescriptor#getAlias() alias} chosen by the same algorithm than
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
index b4dda2e9df..3ddc175ba9 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
@@ -87,7 +87,7 @@ import org.apache.sis.util.resources.Errors;
  *   <th class="sep">Using OGC names</th>
  * </tr>
  * <tr><td>
- * {@preformat wkt
+ * {@snippet lang="wkt" :
  *   Parameter["A0", <value>, Id["EPSG", 8623]],
  *   Parameter["A1", <value>, Id["EPSG", 8624]],
  *   Parameter["A2", <value>, Id["EPSG", 8625]],
@@ -101,7 +101,7 @@ import org.apache.sis.util.resources.Errors;
  * but they are for polynomial transformations, not for affine transformations.</div>
  *
  * </td><td class="sep">
- * {@preformat wkt
+ * {@snippet lang="wkt" :
  *   Parameter["num_row", 3],
  *   Parameter["num_col", 3],
  *   Parameter["elt_0_0", <value>],
@@ -123,18 +123,18 @@ import org.apache.sis.util.resources.Errors;
  * For creating a new group of parameters for a matrix using the {@link #WKT1} naming conventions,
  * one can use the following code:
  *
- * {@preformat java
- *   Map<String,?> properties = Map.of(ParameterValueGroup.NAME_KEY, "Affine");
- *   ParameterValueGroup p = TensorParameters.WKT1.createValueGroup(properties);
- * }
+ * {@snippet lang="java" :
+ *     Map<String,?> properties = Map.of(ParameterValueGroup.NAME_KEY, "Affine");
+ *     ParameterValueGroup p = TensorParameters.WKT1.createValueGroup(properties);
+ *     }
  *
  * For setting the elements of a few values, then create a matrix from the parameter values:
  *
- * {@preformat java
- *   p.parameter("elt_0_0").setValue(4);    // "A0" also accepted as a synonymous of "elt_0_0".
- *   p.parameter("elt_1_1").setValue(6);    // "B1" also accepted as a synonymous of "elt_1_1".
- *   Matrix m = TensorParameters.WKT1.toMatrix(p);
- * }
+ * {@snippet lang="java" :
+ *     p.parameter("elt_0_0").setValue(4);    // "A0" also accepted as a synonymous of "elt_0_0".
+ *     p.parameter("elt_1_1").setValue(6);    // "B1" also accepted as a synonymous of "elt_1_1".
+ *     Matrix m = TensorParameters.WKT1.toMatrix(p);
+ *     }
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 1.2
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/parameter/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/parameter/package-info.java
index 19fd915929..2616089c56 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/parameter/package-info.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/parameter/package-info.java
@@ -68,16 +68,17 @@
  * method is provided for fetching a parameter regardless of whether it was present or not — optional parameters
  * are created when first needed.</p>
  *
- * <div class="note"><b>Example:</b> the following code snippet assumes that the implementer of a Mercator projection
+ * <h3>Example</h3>
+ * The following code snippet assumes that the implementer of a Mercator projection
  * provides a {@code ParameterDescriptorGroup} instance in a {@code PARAMETERS} static constant:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     ParameterValueGroup group = Mercator.PARAMETERS.createValue();
  *     group.parameter("Longitude of natural origin").setValue(-60);        // Using default units (e.g. degrees).
  *     group.parameter("False easting").setValue(200.0, Units.KILOMETRE);   // Using explicit units.
- * }
- * </div>
+ *     }
  *
+ * <h2>Exceptions</h2>
  * Calls to {@code parameter(…)} throw a {@link org.opengis.parameter.ParameterNotFoundException}
  * if the given name is unknown to the group.
  * Calls to {@code setValue(…)} throw a {@link org.opengis.parameter.InvalidParameterValueException}
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
index 40bac3475c..f445e7f302 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
@@ -765,9 +765,9 @@ public class AbstractIdentifiedObject extends FormattableObject implements Ident
      * Compares the specified object with this object for equality.
      * This method is implemented as below (omitting assertions):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return equals(other, ComparisonMode.STRICT);
-     * }
+     *     }
      *
      * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead of this method.
      *
@@ -821,8 +821,8 @@ public class AbstractIdentifiedObject extends FormattableObject implements Ident
      * All {@code computeHashCode()} methods shall invoke {@code super.computeHashCode()},
      * <strong>not</strong> {@code hashCode()}. Example:
      *
-     * {@preformat java
-     *     &#64;Override
+     * {@snippet lang="java" :
+     *     @Override
      *     protected long computeHashCode() {
      *         return super.computeHashCode() + 31 * Objects.hash(myProperties);
      *     }
@@ -855,10 +855,13 @@ public class AbstractIdentifiedObject extends FormattableObject implements Ident
      * }
      * </div><div>
      * <p><b>Java code example</b></p>
-     * {@preformat java
-     *     super.formatTo(formatter);
-     *     // ... write the elements at the insertion point ...
-     *     return "GeodeticCRS";
+     * {@snippet lang="java" :
+     *     @Override
+     *     protected String formatTo(final Formatter formatter) {
+     *         super.formatTo(formatter);
+     *         // ... write the elements at the insertion point ...
+     *         return "GeodeticCRS";
+     *     }
      * }
      * </div></div>
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
index da9f292aa5..a0b380ee75 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
@@ -97,23 +97,23 @@ import static org.apache.sis.util.ArgumentChecks.*;
  *       information given to the {@code Builder} are ignored.</li>
  * </ul>
  *
- * <div class="note"><b>Example:</b>
+ * <h2>Example</h2>
  * The EPSG database defines a projection named <cite>"Mercator (variant A)"</cite> (EPSG:9804).
  * This projection was named <cite>"Mercator (1SP)"</cite> in older EPSG database versions.
  * The same projection was also named "{@code Mercator_1SP}" by OGC some specifications.
  * If we choose EPSG as our primary naming authority, then those three names can be declared as below:
  *
- * {@preformat java
- *   builder.setCodespace (Citations.EPSG, "EPSG")
- *          .addName("Mercator (variant A)")
- *          .addName("Mercator (1SP)")
- *          .addName(Citations.OGC, "Mercator_1SP")
- * }
+ * {@snippet lang="java" :
+ *     builder.setCodespace (Citations.EPSG, "EPSG")
+ *            .addName("Mercator (variant A)")
+ *            .addName("Mercator (1SP)")
+ *            .addName(Citations.OGC, "Mercator_1SP")
+ *     }
  *
  * The {@code toString()} representation of those three names are {@code "Mercator (variant A)"},
  * {@code "Mercator (1SP)"} (note the absence of {@code "EPSG:"} prefix, which is stored as the
  * name {@linkplain org.apache.sis.util.iso.DefaultLocalName#scope() scope} but not shown) and
- * <code>"<b>OGC:</b>Mercator_1SP"</code> respectively.</div>
+ * <code>"<b>OGC:</b>Mercator_1SP"</code> respectively.
  *
  *
  * <h2>Builder property lifetimes</h2>
@@ -154,8 +154,8 @@ import static org.apache.sis.util.ArgumentChecks.*;
  *       usage of {@link #properties} map by the factory.</li>
  * </ul>
  *
- * <div class="note"><b>Example:</b>
- * {@preformat java
+ * <p>Example:</p>
+ * {@snippet lang="java" :
  *     public class MyBuilder extends Builder<MyBuilder> {
  *         public Foo createFoo() {
  *             onCreate(false);
@@ -164,8 +164,7 @@ import static org.apache.sis.util.ArgumentChecks.*;
  *             return foo;
  *         }
  *     }
- * }
- * </div>
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.1
@@ -515,23 +514,23 @@ public abstract class Builder<B extends Builder<B>> {
      * Adds an {@code IdentifiedObject} name in an alternative namespace. This method is typically invoked for
      * {@linkplain AbstractIdentifiedObject#getAlias() aliases} defined after the primary name.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * The <cite>"Longitude of natural origin"</cite> parameter defined by EPSG is named differently
      * by OGC and GeoTIFF. Those alternative names can be defined as below:
      *
-     * {@preformat java
-     *   builder.setCodespace(Citations.EPSG, "EPSG")          // Sets the default namespace to "EPSG".
-     *          .addName("Longitude of natural origin")        // Primary name in builder default namespace.
-     *          .addName(Citations.OGC, "central_meridian")    // First alias in "OGC" namespace.
-     *          .addName(Citations.GEOTIFF, "NatOriginLong");  // Second alias in "GeoTIFF" namespace.
-     * }
+     * {@snippet lang="java" :
+     *     builder.setCodespace(Citations.EPSG, "EPSG")          // Sets the default namespace to "EPSG".
+     *            .addName("Longitude of natural origin")        // Primary name in builder default namespace.
+     *            .addName(Citations.OGC, "central_meridian")    // First alias in "OGC" namespace.
+     *            .addName(Citations.GEOTIFF, "NatOriginLong");  // Second alias in "GeoTIFF" namespace.
+     *     }
      *
      * In this example, {@code "central_meridian"} will be the
      * {@linkplain org.apache.sis.util.iso.DefaultScopedName#tip() tip} and {@code "OGC"} will be the
-     * {@linkplain org.apache.sis.util.iso.DefaultScopedName#head() head} of the first alias.</div>
+     * {@linkplain org.apache.sis.util.iso.DefaultScopedName#head() head} of the first alias.
      *
-     * <p><b>Lifetime:</b>
-     * the name and all aliases are cleared after a {@code createXXX(…)} method has been invoked.</p>
+     * <h4>Lifetime</h4>
+     * The name and all aliases are cleared after a {@code createXXX(…)} method has been invoked.
      *
      * @param  authority  bibliographic reference to the authority defining the codes, or {@code null} if none.
      * @param  name       the {@code IdentifiedObject} alias as a name in the namespace of the given authority.
@@ -1012,7 +1011,7 @@ public abstract class Builder<B extends Builder<B>> {
      * Initializes/cleanups the {@link #properties} map before/after a {@code createXXX(…)} execution.
      * Subclasses shall invoke this method in their {@code createXXX(…)} methods as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     public Foo createFoo() {
      *         final Foo foo;
      *         onCreate(false);
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
index e288bcf6af..18fd2a110b 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
@@ -112,19 +112,19 @@ import org.opengis.geometry.Geometry;
  * (see the <a href="https://sis.apache.org/tables/CoordinateReferenceSystems.html">Apache SIS™ Coordinate
  * Reference System (CRS) codes</a> page for the complete list of EPSG codes):
  *
- * {@preformat java
- *   CoordinateReferenceSystem source = CRS.forCode("EPSG:4326");                   // WGS 84
- *   CoordinateReferenceSystem target = CRS.forCode("EPSG:3395");                   // WGS 84 / World Mercator
- *   CoordinateOperation operation = CRS.findOperation(source, target, null);
- *   if (CRS.getLinearAccuracy(operation) > 100) {
- *       // If the accuracy is coarser than 100 metres (or any other threshold at application choice)
- *       // maybe the operation is not suitable. Decide here what to do (throw an exception, etc).
- *   }
- *   MathTransform mt = operation.getMathTransform();
- *   DirectPosition position = new DirectPosition2D(20, 30);            // 20°N 30°E   (watch out axis order!)
- *   position = mt.transform(position, position);
- *   System.out.println(position);
- * }
+ * {@snippet lang="java" :
+ *     CoordinateReferenceSystem source = CRS.forCode("EPSG:4326");                   // WGS 84
+ *     CoordinateReferenceSystem target = CRS.forCode("EPSG:3395");                   // WGS 84 / World Mercator
+ *     CoordinateOperation operation = CRS.findOperation(source, target, null);
+ *     if (CRS.getLinearAccuracy(operation) > 100) {
+ *         // If the accuracy is coarser than 100 metres (or any other threshold at application choice)
+ *         // maybe the operation is not suitable. Decide here what to do (throw an exception, etc).
+ *     }
+ *     MathTransform mt = operation.getMathTransform();
+ *     DirectPosition position = new DirectPosition2D(20, 30);            // 20°N 30°E   (watch out axis order!)
+ *     position = mt.transform(position, position);
+ *     System.out.println(position);
+ *     }
  *
  * <h2>Note on kinds of CRS</h2>
  * The {@link #getSingleComponents(CoordinateReferenceSystem)} method decomposes an arbitrary CRS into a flat
@@ -261,10 +261,11 @@ public final class CRS extends Static {
      * The default {@linkplain org.apache.sis.io.wkt Apache SIS parser} understands both
      * version 1 (a.k.a. OGC 01-009) and version 2 (a.k.a. ISO 19162) of the WKT format.
      *
-     * <div class="note"><b>Example:</b> below is a slightly simplified WKT 2 string for a Mercator projection.
+     * <h4>Example</h4>
+     * Below is a slightly simplified WKT 2 string for a Mercator projection.
      * For making this example smaller, some optional {@code UNIT[…]} and {@code ORDER[…]} elements have been omitted.
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   ProjectedCRS["SIRGAS 2000 / Brazil Mercator",
      *     BaseGeodCRS["SIRGAS 2000",
      *       Datum["Sistema de Referencia Geocentrico para las Americas 2000",
@@ -280,9 +281,9 @@ public final class CRS extends Static {
      *       Axis["northing (N)", north],
      *       LengthUnit["metre", 1],
      *     Id["EPSG",5641]]
-     * }
-     * </div>
+     *   }
      *
+     * <h4>Logging</h4>
      * If the parsing produced warnings, they will be reported in a logger named {@code "org.apache.sis.io.wkt"}.
      * In particular, this method verifies if the description provided by the WKT matches the description provided
      * by the authority ({@code "EPSG:5641"} in above example) and reports discrepancies.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
index f1dd4fffc5..4672338fc4 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
@@ -116,14 +116,15 @@ import static org.apache.sis.internal.util.StandardDateFormat.MILLISECONDS_PER_D
  * instance twice will return the same {@link IdentifiedObject} instance, unless the internal cache has been cleared
  * (e.g. the application is running in a container environment and some modules have been installed or uninstalled).</p>
  *
- * <div class="note"><b>Example:</b> the following code fetches a geographic Coordinate Reference System
+ * <h2>Example</h2>
+ * The following code fetches a geographic Coordinate Reference System
  * using (<var>longitude</var>, <var>latitude</var>) axis order on the {@link #WGS84} geodetic datum:
  *
- * {@preformat java
- *   GeographicCRS crs = CommonCRS.WGS84.normalizedGeographic();
- * }
- * </div>
+ * {@snippet lang="java" :
+ *     GeographicCRS crs = CommonCRS.WGS84.normalizedGeographic();
+ *     }
  *
+ * <h2>Available objects</h2>
  * For each enumeration value, the name of the CRS, datum and ellipsoid objects may or may not be the same.
  * Below is an alphabetical list of object names available in this enumeration:
  *
@@ -1189,9 +1190,9 @@ public enum CommonCRS {
      * <p><b>Example:</b> the following code fetches a vertical Coordinate Reference System for heights
      * above the Mean Sea Level (MSL):</p>
      *
-     * {@preformat java
-     *   VerticalCRS crs = CommonCRS.Vertical.MEAN_SEA_LEVEL.crs();
-     * }
+     * {@snippet lang="java" :
+     *     VerticalCRS crs = CommonCRS.Vertical.MEAN_SEA_LEVEL.crs();
+     *     }
      *
      * Below is an alphabetical list of object names available in this enumeration:
      *
@@ -1500,9 +1501,9 @@ public enum CommonCRS {
      *
      * <p><b>Example:</b> the following code fetches a temporal Coordinate Reference System using the Julian calendar:</p>
      *
-     * {@preformat java
-     *   TemporalCRS crs = CommonCRS.Temporal.JULIAN.crs();
-     * }
+     * {@snippet lang="java" :
+     *     TemporalCRS crs = CommonCRS.Temporal.JULIAN.crs();
+     *     }
      *
      * Below is an alphabetical list of object names available in this enumeration.
      * Note that the namespace of identifiers ("OGC" versus "SIS") may change in any future version.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
index fb058662a2..caac227d23 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
@@ -431,9 +431,9 @@ public final class IdentifiedObjects extends Static {
      * declares explicitly its identifier. If the declared identifier is wanted unconditionally,
      * one can use the following pattern instead:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     String urn = toURN(object.getClass(), getIdentifier(object, authority));
-     * }
+     *     }
      *
      * This method can be seen as a converse of {@link CRS#forCode(String)}.
      *
@@ -542,9 +542,9 @@ public final class IdentifiedObjects extends Static {
      * declares explicitly its identifier. If the declared identifier is wanted unconditionally,
      * one can use the following pattern instead:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     String code = toString(getIdentifier(object, Citations.EPSG));
-     * }
+     *     }
      *
      * This method can be seen as a converse of {@link CRS#forCode(String)}.
      *
@@ -587,30 +587,30 @@ public final class IdentifiedObjects extends Static {
      * Creates a finder which can be used for looking up unidentified objects.
      * This method is an alternative to {@code lookup(…)} methods when more control are desired.
      *
-     * <div class="note"><b>Example 1: be lenient regarding axis order</b><br>
+     * <h4>Example 1: be lenient regarding axis order</h4>
      * By default, {@code lookup(…)} methods require that objects in the dataset have their axes in the
      * same order than the given object. For relaxing this condition, one can use the following Java code.
      * This example assumes that at most one object from the dataset will match the given object.
      * If more than one object may match, then the call to {@code findSingleton(…)} should be replaced
      * by {@code find(…)}.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     IdentifiedObjectFinder finder = IdentifiedObjects.newFinder(null);
      *     finder.setIgnoringAxes(true);
      *     IdentifiedObject found = finder.findSingleton(object);
-     * }</div>
+     *     }
      *
-     * <div class="note"><b>Example 2: extend the search to deprecated definitions</b><br>
+     * <h4>Example 2: extend the search to deprecated definitions</h4>
      * By default, {@code lookup(…)} methods exclude deprecated objects from the search.
      * To search also among deprecated objects, one can use the following Java code:
      * This example does not use the {@code findSingleton(…)} convenience method on the assumption
      * that the search may find both deprecated and non-deprecated objects.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     IdentifiedObjectFinder finder = IdentifiedObjects.newFinder(null);
      *     finder.setSearchDomain(IdentifiedObjectFinder.Domain.ALL_DATASET);
      *     Set<IdentifiedObject> found = finder.find(object);
-     * }</div>
+     *     }
      *
      * @param  authority  the authority of the objects to search (typically {@code "EPSG"} or {@code "OGC"}),
      *         or {@code null} for searching among the objects created by all authorities.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/ImmutableIdentifier.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/ImmutableIdentifier.java
index 7b7fff59c9..21382694fc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/ImmutableIdentifier.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/ImmutableIdentifier.java
@@ -67,9 +67,9 @@ import static org.apache.sis.util.collection.Containers.property;
  * If there is no code space, then the {@linkplain #getAuthority() authority} abbreviation is used as a fallback.
  * Example:
  *
- * {@preformat wkt
+ * {@snippet lang="wkt" :
  *   AUTHORITY["EPSG", "4326"]
- * }
+ *   }
  *
  * </li><li><b><cite>Well Known Text</cite> (WKT) version 2</b><br>
  * The WKT 2 format contains the {@linkplain #getCodeSpace() code space}, the {@linkplain #getCode() code},
@@ -78,15 +78,15 @@ import static org.apache.sis.util.collection.Containers.property;
  * (the URN syntax is described in the next item below).
  * Example:
  *
- * {@preformat wkt
+ * {@snippet lang="wkt" :
  *   ID["EPSG", 4326, URI["urn:ogc:def:crs:EPSG::4326"]]
- * }
+ *   }
  *
  * </li><li><b>XML in referencing objects</b><br>
  * The <cite>Definition identifier URNs in OGC namespace</cite> paper defines a syntax for identifiers commonly
  * found in Geographic Markup Language (GML) documents. Example:
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <gml:identifier codeSpace="IOGP">urn:ogc:def:crs:EPSG::4326</gml:identifier>
  * }
  *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
index 838e3584f6..8ce9eb7eb1 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
@@ -62,9 +62,9 @@ import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
  * <p>Coordinate reference systems can have an arbitrary number of dimensions.
  * The actual dimension of a given instance can be determined as below:</p>
  *
- * {@preformat java
- *   int dimension = crs.getCoordinateSystem().getDimension();
- * }
+ * {@snippet lang="java" :
+ *     int dimension = crs.getCoordinateSystem().getDimension();
+ *     }
  *
  * However, most subclasses restrict the allowed number of dimensions.
  *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
index a15aa3a391..165fb5391b 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
@@ -297,16 +297,16 @@ public class DefaultEngineeringCRS extends AbstractCRS implements EngineeringCRS
      * <div class="note"><b>Implementation note:</b>
      * The usual way to handle {@code <xs:choice>} with JAXB is to annotate a single method like below:
      *
-     * {@preformat java
-     *     &#64;Override
-     *     &#64;XmlElements({
-     *       &#64;XmlElement(name = "cartesianCS",   type = DefaultCartesianCS.class),
-     *       &#64;XmlElement(name = "affineCS",      type = DefaultAffineCS.class),
-     *       &#64;XmlElement(name = "cylindricalCS", type = DefaultCylindricalCS.class),
-     *       &#64;XmlElement(name = "linearCS",      type = DefaultLinearCS.class),
-     *       &#64;XmlElement(name = "polarCS",       type = DefaultPolarCS.class),
-     *       &#64;XmlElement(name = "sphericalCS",   type = DefaultSphericalCS.class),
-     *       &#64;XmlElement(name = "userDefinedCS", type = DefaultUserDefinedCS.class)
+     * {@snippet lang="java" :
+     *     @Override
+     *     @XmlElements({
+     *       @XmlElement(name = "cartesianCS",   type = DefaultCartesianCS.class),
+     *       @XmlElement(name = "affineCS",      type = DefaultAffineCS.class),
+     *       @XmlElement(name = "cylindricalCS", type = DefaultCylindricalCS.class),
+     *       @XmlElement(name = "linearCS",      type = DefaultLinearCS.class),
+     *       @XmlElement(name = "polarCS",       type = DefaultPolarCS.class),
+     *       @XmlElement(name = "sphericalCS",   type = DefaultSphericalCS.class),
+     *       @XmlElement(name = "userDefinedCS", type = DefaultUserDefinedCS.class)
      *     })
      *     public CoordinateSystem getCoordinateSystem() {
      *         return super.getCoordinateSystem();
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
index e704c43bc2..abc01870d0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
@@ -59,9 +59,9 @@ import org.apache.sis.referencing.AbstractReferenceSystem;
  *
  * <b>Example:</b> the following code gets a geocentric CRS using the <cite>World Geodetic System 1984</cite> datum:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     GeodeticDatum datum = CommonCRS.WGS84.geocentric();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself),
@@ -248,10 +248,11 @@ public class DefaultGeocentricCRS extends DefaultGeodeticCRS implements Geocentr
     /**
      * Formats this CRS as a <cite>Well Known Text</cite> {@code GeodeticCRS[…]} element.
      *
-     * <div class="note"><b>Example:</b> Well-Known Text (version 2)
+     * <h4>Example</h4>
+     * Well-Known Text (version 2)
      * of a geocentric coordinate reference system using the WGS 84 datum.
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   GeodeticCRS["Geocentric",
      *     Datum["World Geodetic System 1984",
      *       Ellipsoid["WGS84", 6378137.0, 298.257223563, LengthUnit["metre", 1]]],
@@ -261,11 +262,11 @@ public class DefaultGeocentricCRS extends DefaultGeodeticCRS implements Geocentr
      *       Axis["(Y)", geocentricY],
      *       Axis["(Z)", geocentricZ],
      *       LengthUnit["metre", 1]]
-     * }
+     *   }
      *
      * <p>Same coordinate reference system using WKT 1. Note that axis directions are totally different.</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   GEOCCS["Geocentric",
      *     DATUM["World Geodetic System 1984",
      *       SPHEROID["WGS84", 6378137.0, 298.257223563]],
@@ -274,9 +275,9 @@ public class DefaultGeocentricCRS extends DefaultGeodeticCRS implements Geocentr
      *     AXIS["X", OTHER],
      *     AXIS["Y", EAST],
      *     AXIS["Z", NORTH]]
-     * }
-     * </div>
+     *   }
      *
+     * @param  formatter  the formatter where to format the inner content of this WKT element.
      * @return {@code "GeodeticCRS"} (WKT 2) or {@code "GeocCS"} (WKT 1).
      *
      * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#49">WKT 2 specification §8</a>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
index 21b4782194..249c96ba16 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeodeticCRS.java
@@ -309,15 +309,15 @@ class DefaultGeodeticCRS extends AbstractCRS implements GeodeticCRS { // If made
     /**
      * Invoked by JAXB at marshalling time.
      *
-     * <div class="note"><b>Implementation note:</b>
+     * <h4>Implementation note</h4>
      * The usual way to handle {@code <xs:choice>} with JAXB is to annotate a single method like below:
      *
-     * {@preformat java
-     *     &#64;Override
-     *     &#64;XmlElements({
-     *       &#64;XmlElement(name = "ellipsoidalCS", type = DefaultEllipsoidalCS.class),
-     *       &#64;XmlElement(name = "cartesianCS",   type = DefaultCartesianCS.class),
-     *       &#64;XmlElement(name = "sphericalCS",   type = DefaultSphericalCS.class)
+     * {@snippet lang="java" :
+     *     @Override
+     *     @XmlElements({
+     *       @XmlElement(name = "ellipsoidalCS", type = DefaultEllipsoidalCS.class),
+     *       @XmlElement(name = "cartesianCS",   type = DefaultCartesianCS.class),
+     *       @XmlElement(name = "sphericalCS",   type = DefaultSphericalCS.class)
      *     })
      *     public CoordinateSystem getCoordinateSystem() {
      *         return super.getCoordinateSystem();
@@ -325,7 +325,7 @@ class DefaultGeodeticCRS extends AbstractCRS implements GeodeticCRS { // If made
      * }
      *
      * However, our attempts to apply this approach worked for {@code DefaultParameterValue} but not for this class:
-     * for an unknown reason, the unmarshalled CS object is empty.</div>
+     * for an unknown reason, the unmarshalled CS object is empty.
      *
      * @see <a href="http://issues.apache.org/jira/browse/SIS-166">SIS-166</a>
      */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
index bdc2ec248f..23f3b2b957 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
@@ -74,9 +74,9 @@ import static org.apache.sis.internal.util.Constants.CRS84;
  * <b>Example:</b> the following code gets a two-dimensional geographic CRS
  * using the <cite>World Geodetic System 1984</cite> datum:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     GeodeticDatum datum = CommonCRS.WGS84.geographic();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself),
@@ -278,10 +278,11 @@ public class DefaultGeographicCRS extends DefaultGeodeticCRS implements Geograph
     /**
      * Formats this CRS as a <cite>Well Known Text</cite> {@code GeodeticCRS[…]} element.
      *
-     * <div class="note"><b>Example:</b> Well-Known Text (version 2)
+     * <h4>Example</h4>
+     * Well-Known Text (version 2)
      * of a geographic coordinate reference system using the WGS 84 datum.
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   GeodeticCRS["WGS 84",
      *      Datum["World Geodetic System 1984",
      *        Ellipsoid["WGS84", 6378137.0, 298.257223563, LengthUnit["metre", 1]]],
@@ -294,11 +295,11 @@ public class DefaultGeographicCRS extends DefaultGeodeticCRS implements Geograph
      *      BBox[-90.00, -180.00, 90.00, 180.00],
      *      Scope["Used by GPS satellite navigation system."],
      *      Id["EPSG", 4326, Citation["IOGP"], URI["urn:ogc:def:crs:EPSG::4326"]]]
-     * }
+     *   }
      *
      * <p>Same coordinate reference system using WKT 1.</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   GEOGCS["WGS 84",
      *      DATUM["World Geodetic System 1984",
      *        SPHEROID["WGS84", 6378137.0, 298.257223563]],
@@ -307,9 +308,9 @@ public class DefaultGeographicCRS extends DefaultGeodeticCRS implements Geograph
      *      AXIS["Latitude", NORTH],
      *      AXIS["Longitude", EAST],
      *      AUTHORITY["EPSG", "4326"]]
-     * }
-     * </div>
+     *   }
      *
+     * @param  formatter  the formatter where to format the inner content of this WKT element.
      * @return {@code "GeodeticCRS"} (WKT 2) or {@code "GeogCS"} (WKT 1).
      *
      * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#49">WKT 2 specification §8</a>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java
index c7b5cb3bac..a05830e454 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultImageCRS.java
@@ -292,14 +292,14 @@ public class DefaultImageCRS extends AbstractCRS implements ImageCRS {
      * Used by JAXB only (invoked by reflection).
      * Only one of {@code getCartesianCS()} and {@link #getAffineCS()} can return a non-null value.
      *
-     * <div class="note"><b>Implementation note:</b>
+     * <h4>Implementation note</h4>
      * The usual way to handle {@code <xs:choice>} with JAXB is to annotate a single method like below:
      *
-     * {@preformat java
-     *     &#64;Override
-     *     &#64;XmlElements({
-     *       &#64;XmlElement(name = "cartesianCS", type = DefaultCartesianCS.class),
-     *       &#64;XmlElement(name = "affineCS",    type = DefaultAffineCS.class)
+     * {@snippet lang="java" :
+     *     @Override
+     *     @XmlElements({
+     *       @XmlElement(name = "cartesianCS", type = DefaultCartesianCS.class),
+     *       @XmlElement(name = "affineCS",    type = DefaultAffineCS.class)
      *     })
      *     public AffineCS getCoordinateSystem() {
      *         return super.getCoordinateSystem();
@@ -307,7 +307,7 @@ public class DefaultImageCRS extends AbstractCRS implements ImageCRS {
      * }
      *
      * However, our attempts to apply this approach worked for {@code DefaultParameterValue} but not for this class:
-     * for an unknown reason, the unmarshalled CS object is empty.</div>
+     * for an unknown reason, the unmarshalled CS object is empty.
      *
      * @see <a href="http://issues.apache.org/jira/browse/SIS-166">SIS-166</a>
      */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
index 09356d81a1..192d8d58d6 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
@@ -312,10 +312,11 @@ public class DefaultProjectedCRS extends AbstractDerivedCRS<Projection> implemen
     /**
      * Formats the inner part of the <cite>Well Known Text</cite> (WKT) representation of this CRS.
      *
-     * <div class="note"><b>Example:</b> Well-Known Text (version 2)
+     * <h4>Example</h4>
+     * Well-Known Text (version 2)
      * of a projected coordinate reference system using the Lambert Conformal method.
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   ProjectedCRS[“NTF (Paris) / Lambert zone II”,
      *     BaseGeodCRS[“NTF (Paris)”,
      *       Datum[“Nouvelle Triangulation Francaise”,
@@ -333,11 +334,11 @@ public class DefaultProjectedCRS extends AbstractDerivedCRS<Projection> implemen
      *       Axis[“Northing (N)”, north, Order[2]],
      *       LengthUnit[“metre”, 1],
      *     Id[“EPSG”, 27572, Citation[“IOGP”], URI[“urn:ogc:def:crs:EPSG::27572”]]]
-     * }
+     *   }
      *
      * <p>Same coordinate reference system using WKT 1.</p>
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   PROJCS[“NTF (Paris) / Lambert zone II”,
      *     GEOGCS[“NTF (Paris)”,
      *       DATUM[“Nouvelle Triangulation Francaise”,
@@ -356,9 +357,9 @@ public class DefaultProjectedCRS extends AbstractDerivedCRS<Projection> implemen
      *     AXIS[“Easting”, EAST],
      *     AXIS[“Northing”, NORTH],
      *     AUTHORITY[“EPSG”, “27572”]]
-     * }
-     * </div>
+     *   }
      *
+     * @param  formatter  the formatter where to format the inner content of this WKT element.
      * @return {@code "ProjectedCRS"} (WKT 2) or {@code "ProjCS"} (WKT 1).
      *
      * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#57">WKT 2 specification §9</a>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
index 94d8581031..b48ef85eea 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
@@ -508,19 +508,20 @@ public class AbstractCS extends AbstractIdentifiedObject implements CoordinateSy
      * the {@code CS[…]} element for historical reasons. Axes shall be formatted by the enclosing
      * element (usually an {@link org.apache.sis.referencing.crs.AbstractCRS}).
      *
-     * <div class="note"><b>Example:</b> Well-Known Text of a two-dimensional {@code EllipsoidalCS}
+     * <h4>Example</h4>
+     * Well-Known Text of a two-dimensional {@code EllipsoidalCS}
      * having (φ,λ) axes in a unit defined by the enclosing CRS (usually degrees).
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   CS[ellipsoidal, 2],
      *   Axis["latitude", north],
      *   Axis["longitude", east]
      * }
-     * </div>
      *
-     * <div class="note"><b>Compatibility note:</b>
-     * {@code CS} is defined in the WKT 2 specification only.</div>
+     * <h4>Compatibility note</h4>
+     * {@code CS} is defined in the WKT 2 specification only.
      *
+     * @param  formatter  the formatter where to format the inner content of this WKT element.
      * @return {@code "CS"}.
      *
      * @see <a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html#36">WKT 2 specification §7.5</a>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
index b437269198..1898faa92a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AxisFilter.java
@@ -68,12 +68,12 @@ public interface AxisFilter {
      * Returns a replacement for the given axis direction.
      * The default implementation unconditionally returns the given {@code direction} unchanged.
      *
-     * <div class="note"><b>Example:</b>
-     * for forcing the direction of the <var>z</var> axis toward up while leaving other axes unchanged,
+     * <h4>Example</h4>
+     * For forcing the direction of the <var>z</var> axis toward up while leaving other axes unchanged,
      * one can write:
      *
-     * {@preformat java
-     *     &#64;Override
+     * {@snippet lang="java" :
+     *     @Override
      *     public getDirectionReplacement(CoordinateSystemAxis axis, AxisDirection direction) {
      *         if (direction == AxisDirection.DOWN) {
      *             direction = AxisDirection.UP;
@@ -81,7 +81,6 @@ public interface AxisFilter {
      *         return direction;
      *     }
      * }
-     * </div>
      *
      * @param  axis       the axis for which to change axis direction, if desired.
      * @param  direction  the original axis direction.
@@ -97,12 +96,12 @@ public interface AxisFilter {
      * Returns a replacement for the given axis unit.
      * The default implementation unconditionally returns the given {@code unit} unchanged.
      *
-     * <div class="note"><b>Example:</b>
-     * for replacing all angular units of a coordinate system to degrees (regardless what the original
+     * <h4>Example</h4>
+     * For replacing all angular units of a coordinate system to degrees (regardless what the original
      * angular units were) while leaving other kinds of units unchanged, one can write:
      *
-     * {@preformat java
-     *     &#64;Override
+     * {@snippet lang="java" :
+     *     @Override
      *     public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
      *         if (Units.isAngular(unit)) {
      *             unit = Units.DEGREE;
@@ -110,7 +109,6 @@ public interface AxisFilter {
      *         return unit;
      *     }
      * }
-     * </div>
      *
      * @param  axis  the axis for which to change unit, if desired.
      * @param  unit  the original axis unit.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
index f259026dac..857dadb5e4 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
@@ -439,14 +439,14 @@ next:   for (final CoordinateSystem cs : targets) {
      * Returns a coordinate system derived from the given one but with a modified list of axes.
      * The axes may be filtered (excluding some axes), reordered or have their unit and direction modified.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * for replacing all angular units of a coordinate system to degrees (regardless what the original
      * angular units were) while leaving other kinds of units unchanged, one can write:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     CoordinateSystem cs = ...;
      *     cs = CoordinateSystems.replaceAxes(cs, new AxisFilter() {
-     *         &#64;Override
+     *         @Override
      *         public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
      *             if (Units.isAngular(unit)) {
      *                 unit = Units.DEGREE;
@@ -454,21 +454,21 @@ next:   for (final CoordinateSystem cs : targets) {
      *             return unit;
      *         }
      *     });
-     * }</div>
+     *     }
      *
      * <h4>Coordinate system normalization</h4>
      * This method is often used together with {@link #swapAndScaleAxes swapAndScaleAxes(…)} for normalizing the
      * coordinate values given to a {@linkplain org.apache.sis.referencing.operation.transform.AbstractMathTransform
      * math transform}.
      *
-     * <div class="note"><b>Example:</b>
-     * {@preformat java
+     * <h4>Example</h4>
+     * {@snippet lang="java" :
      *     CoordinateSystem sourceCS = ...;
      *     CoordinateSystem targetCS = ...;
      *     Matrix step1 = swapAndScaleAxes(sourceCS, replaceAxes(sourceCS, AxisConvention.NORMALIZED));
      *     Matrix step2 = ...; // some transform working on coordinates with standard axis order and unit.
      *     Matrix step3 = swapAndScaleAxes(replaceAxes(targetCS, AxisConvention.NORMALIZED), targetCS);
-     * }</div>
+     *     }
      *
      * A rational for normalized axis order and units is explained in the <cite>Axis units and direction</cite> section
      * in the description of the {@linkplain org.apache.sis.referencing.operation.projection map projection package}.
@@ -511,13 +511,13 @@ next:   for (final CoordinateSystem cs : targets) {
      * Non-linear units (e.g. angular or scale units) are left unchanged.
      *
      * <p>This convenience method is equivalent to the following code:</p>
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return CoordinateSystems.replaceAxes(cs, new AxisFilter() {
-     *         &#64;Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
+     *         @Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
      *             return Units.isLinear(unit) ? newUnit : unit;
      *         }
      *     });
-     * }
+     *     }
      *
      * @param  cs       the coordinate system in which to replace linear units, or {@code null}.
      * @param  newUnit  the new linear unit.
@@ -542,13 +542,13 @@ next:   for (final CoordinateSystem cs : targets) {
      * Non-angular units (e.g. linear or scale units) are left unchanged.
      *
      * <p>This convenience method is equivalent to the following code:</p>
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return CoordinateSystems.replaceAxes(cs, new AxisFilter() {
-     *         &#64;Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
+     *         @Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
      *             return Units.isAngular(unit) ? newUnit : unit;
      *         }
      *     });
-     * }
+     *     }
      *
      * @param  cs       the coordinate system in which to replace angular units, or {@code null}.
      * @param  newUnit  the new angular unit.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
index 40e4749e41..09529a759f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
@@ -786,19 +786,19 @@ public abstract class DatumShiftGrid<C extends Quantity<C>, T extends Quantity<T
      * So the period to add or remove is the number of cells that the grid would have if it was spanning 360° of
      * longitude.</p>
      *
-     * <div class="note"><b>Example:</b>
-     * if longitude values are mapped to {@code gridX} coordinates (in dimension 0), and if a shift of 360° in
+     * <h4>Example</h4>
+     * If longitude values are mapped to {@code gridX} coordinates (in dimension 0), and if a shift of 360° in
      * longitude values is equivalent to a shift of {@code periodX} cells in the grid, then this method can be
      * implemented as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     private final double periodX = ...;      // Number of grid cells in 360° of longitude.
      *
-     *     &#64;Override
+     *     @Override
      *     protected void replaceOutsideGridCoordinates(double[] gridCoordinates) {
      *         gridCoordinates[0] = Math.IEEEremainder(gridCoordinates[0], periodX);
      *     }
-     * }</div>
+     * }
      *
      * This method receives all grid coordinates in the {@code gridCoordinates} argument and can modify any
      * of them, possibly many at once. The reason is because a shift of 360° of longitude (for example) may
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
index ec98e279be..aee602ef93 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
@@ -93,9 +93,9 @@ import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
  *
  * <b>Example:</b> the following code gets the WGS84 ellipsoid:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Ellipsoid e = CommonCRS.WGS84.ellipsoid();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
index 4ee9e84a07..61da37db7a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
@@ -116,9 +116,9 @@ import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
  *
  * <b>Example:</b> the following code gets a <cite>World Geodetic System 1984</cite> datum:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     GeodeticDatum datum = CommonCRS.WGS84.datum();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself),
@@ -622,22 +622,22 @@ public class DefaultGeodeticDatum extends AbstractDatum implements GeodeticDatum
     /**
      * Formats this datum as a <cite>Well Known Text</cite> {@code Datum[…]} element.
      *
-     * <div class="note"><b>Example:</b> Well-Known Text of a WGS 84 datum.
+     * <h4>Example</h4>
+     * Well-Known Text of a WGS 84 datum.
      *
-     * {@preformat wkt
-     *      Datum["World Geodetic System 1984",
-     *        Ellipsoid["WGS84", 6378137.0, 298.257223563, LengthUnit["metre", 1]],
-     *      Id["EPSG", 6326, Citation["IOGP"], URI["urn:ogc:def:datum:EPSG::6326"]]]
-     * }
+     * {@snippet lang="wkt" :
+     *   Datum["World Geodetic System 1984",
+     *     Ellipsoid["WGS84", 6378137.0, 298.257223563, LengthUnit["metre", 1]],
+     *   Id["EPSG", 6326, Citation["IOGP"], URI["urn:ogc:def:datum:EPSG::6326"]]]
+     *   }
      *
      * <p>Same datum using WKT 1.</p>
      *
-     * {@preformat wkt
-     *      DATUM["World Geodetic System 1984"
-     *        SPHEROID["WGS84", 6378137.0, 298.257223563],
-     *      AUTHORITY["EPSG", "6326"]]
-     * }
-     * </div>
+     * {@snippet lang="wkt" :
+     *   DATUM["World Geodetic System 1984"
+     *     SPHEROID["WGS84", 6378137.0, 298.257223563],
+     *   AUTHORITY["EPSG", "6326"]]
+     *   }
      *
      * Note that the {@linkplain #getPrimeMeridian() prime meridian} shall be formatted by the caller
      * as a separated element after the geodetic datum (for compatibility with WKT 1).
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
index d13e602c7b..c98aaf2cfb 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
@@ -71,9 +71,9 @@ import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
  *
  * <b>Example:</b> the following code gets the Greenwich prime meridian:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     PrimeMeridian pm = CommonCRS.WGS84.primeMeridian();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
@@ -227,9 +227,9 @@ public class DefaultPrimeMeridian extends AbstractIdentifiedObject implements Pr
      * This convenience method makes it easier to obtain longitude in decimal degrees using the following
      * code, regardless of the underlying angular units of this prime meridian:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     double longitudeInDegrees = primeMeridian.getGreenwichLongitude(Units.DEGREE);
-     * }
+     *     }
      *
      * @param  unit  the unit in which to express longitude.
      * @return the Greenwich longitude in the given units.
@@ -312,7 +312,7 @@ public class DefaultPrimeMeridian extends AbstractIdentifiedObject implements Pr
      * of an {@code AbstractDerivedCRS}. In such case, base CRS coordinate system axes shall not be formatted, which
      * has the consequence of bringing the {@code UNIT[…]} element right below the {@code PRIMEM[…]} one. Example:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   ProjectedCRS[“NTF (Paris) / Lambert zone II”,
      *     BaseGeodCRS[“NTF (Paris)”,
      *       Datum[“Nouvelle Triangulation Francaise”,
@@ -321,7 +321,7 @@ public class DefaultPrimeMeridian extends AbstractIdentifiedObject implements Pr
      *       AngleUnit[“grad”, 0.015707963267948967]],
      *     Conversion[“Lambert zone II”,
      *       etc...
-     * }
+     *   }
      *
      * If we were not formatting a base CRS, we would have many lines between {@code PrimeMeridian[…]} and
      * {@code AngleUnit[…]} in the above example, which would make less obvious that the angle unit applies
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
index 942e22bfd3..7be27c2d69 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
@@ -60,9 +60,9 @@ import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
  *
  * <b>Example:</b> the following code gets a temporal datum having its origin at January 1st, 4713 BC at 12:00 UTC:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     TemporalDatum datum = CommonCRS.Temporal.JULIAN.datum();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
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 d1ee13c462..a5cfc6fcd1 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
@@ -62,9 +62,9 @@ import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
  *
  * <b>Example:</b> the following code gets a vertical datum for height above the geoid:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     VerticalDatum datum = CommonCRS.Vertical.GEOID.datum();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
index 6a41667ee6..7303869eef 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
@@ -45,16 +45,16 @@ import org.apache.sis.internal.util.Strings;
  * It may also be used as a workaround for authority factories that do not implement the {@code createObject(String)}
  * method.</p>
  *
- * <div class="note"><b>Example:</b>
- * the following code creates a proxy which will delegates its work to the
+ * <h2>Example</h2>
+ * The following code creates a proxy which will delegates its work to the
  * {@link GeodeticAuthorityFactory#createGeographicCRS createGeographicCRS} method.
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     String code = ...;
  *     AuthorityFactory factory = ...;
  *     AuthorityFactoryProxy proxy = AuthorityFactoryProxy.getInstance(GeographicCRS.class);
  *     GeographicCRS crs = proxy.create(factory, code); // Invokes factory.createGeographicCRS(code);
- * }</div>
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.7
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
index ba8cf41646..3c5537d2fe 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
@@ -1819,14 +1819,14 @@ public abstract class ConcurrentAuthorityFactory<DAO extends GeodeticAuthorityFa
          * The {@link #release()} method must be invoked in a {@code finally} block after the call to {@code acquire}.
          * The pattern must be as below (note that the call to {@code acquire()} is inside the {@code try} block):
          *
-         * {@preformat java
+         * {@snippet lang="java" :
          *     try {
          *         acquire();
          *         (finder or proxy).doSomeStuff();
          *     } finally {
          *         release();
          *     }
-         * }
+         *     }
          */
         private void acquire() throws FactoryException {
             assert Thread.holdsLock(this);
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
index 130abbc8ec..8089641574 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
@@ -1590,10 +1590,11 @@ public class GeodeticObjectFactory extends AbstractFactory implements CRSFactory
      * This method understands both version 1 (a.k.a. OGC 01-009) and version 2 (a.k.a. ISO 19162)
      * of the WKT format.
      *
-     * <div class="note"><b>Example:</b> below is a slightly simplified WKT 2 string for a Mercator projection.
+     * <h4>Example</h4>
+     * Below is a slightly simplified WKT 2 string for a Mercator projection.
      * For making this example smaller, some optional {@code UNIT[…]} and {@code ORDER[…]} elements have been omitted.
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   ProjectedCRS["SIRGAS 2000 / Brazil Mercator",
      *     BaseGeodCRS["SIRGAS 2000",
      *       Datum["Sistema de Referencia Geocentrico para las Americas 2000",
@@ -1609,9 +1610,9 @@ public class GeodeticObjectFactory extends AbstractFactory implements CRSFactory
      *       Axis["northing (N)", north],
      *       LengthUnit["metre", 1],
      *     Id["EPSG",5641]]
-     * }
-     * </div>
+     *   }
      *
+     * <h4>Logging</h4>
      * If the given text contains non-fatal anomalies
      * (unknown or unsupported WKT elements, inconsistent unit definitions, unparsable axis abbreviations, <i>etc.</i>),
      * warnings may be reported in a {@linkplain java.util.logging.Logger logger} named {@code "org.apache.sis.io.wkt"}.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java
index 5c6ad247c7..2e5a538f88 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java
@@ -41,17 +41,17 @@ import org.apache.sis.referencing.factory.IdentifiedObjectSet;
  *       Those conversions are obtained by a SQL query like below (note that this query can return at most
  *       one result, because {@code COORD_REF_SYS_CODE} is a primary key):
  *
- *       {@preformat sql
+ *       {@snippet lang="sql" :
  *         SELECT PROJECTION_CONV_CODE FROM "Coordinate Reference System" WHERE SOURCE_GEOGCRS_CODE = ? AND COORD_REF_SYS_CODE = ?
- *       }
+ *         }
  *   </li>
  *
  *   <li>The coordinate operation may be standalone. This is the case of coordinate transformations having stochastic errors.
  *       Those transformations are obtained by a SQL query like below (note that this query can return many results):
  *
- *       {@preformat sql
+ *       {@snippet lang="sql" :
  *         SELECT COORD_OP_CODE FROM "Coordinate_Operation" … WHERE … AND SOURCE_CRS_CODE = ? AND TARGET_CRS_CODE = ?
- *       }
+ *         }
  *   </li>
  * </ol>
  *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGCodeFinder.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGCodeFinder.java
index b2eebd81bd..d7d6a4c222 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGCodeFinder.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGCodeFinder.java
@@ -161,10 +161,10 @@ final class EPSGCodeFinder extends IdentifiedObjectFinder {
      * A condition to put in a SQL {@code WHERE} clause. SQL query will be one of the forms shown below,
      * where {@code <column>} and {@code <values>} are {@link #column} and {@link #values} respectively.
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     SELECT <codeColumn> FROM <table> WHERE <column> IN (<values>)
      *     SELECT <codeColumn> FROM <table> WHERE <column> >= <value - ε> AND <column> <= <value + ε>
-     * }
+     *     }
      *
      * The latter form is used if {@code <filters>} is a floating point value.
      * Otherwise, {@code <filters>} are typically EPSG codes of dependencies.
@@ -521,9 +521,9 @@ crs:    if (isInstance(CoordinateReferenceSystem.class, object)) {
      * Appends to the given buffer the SQL statement for filtering datum names using a pattern created by
      * {@link #toDatumPattern(String, StringBuilder)}. This method append a SQL fragment like below:
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     (LOWER(<column>) LIKE '<pattern>' OR …)
-     * }
+     *     }
      *
      * This method assumes that {@code namePatterns} contains at least one element.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
index f9a24349b0..29de4e764f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
@@ -511,9 +511,9 @@ addURIs:    for (int i=0; ; i++) {
      * This returned set may keep a connection to the EPSG database,
      * so the set can execute efficiently idioms like the following one:
      *
-     * {@preformat java
-     *     getAuthorityCodes(type).containsAll(others)
-     * }
+     * {@snippet lang="java" :
+     *     getAuthorityCodes(type).containsAll(others);
+     *     }
      *
      * The returned set should not be referenced for a long time, as it may prevent this factory to release
      * JDBC resources. If the set of codes is needed for a long time, their values should be copied in another
@@ -1030,14 +1030,14 @@ codes:  for (int i=0; i<codes.length; i++) {
      * Ensures that this factory is not already building an object of the given code.
      * This method shall be followed by a {@code try ... finally} block like below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     ensureNoCycle(type, code);
      *     try {
      *         ...
      *     } finally {
      *         endOfRecursive(type, code);
      *     }
-     * }
+     *     }
      */
     private void ensureNoCycle(final Class<?> type, final Integer code) throws FactoryException {
         if (safetyGuard.putIfAbsent(code, type) != null) {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
index f69e253222..992a9a7823 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
@@ -504,9 +504,9 @@ public class EPSGFactory extends ConcurrentAuthorityFactory<EPSGDataAccess> impl
      * wanting to return instances of their own {@link EPSGDataAccess} subclass.
      * The default implementation is simply:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return new EPSGDataAccess(this, connection, translator);
-     * }
+     *     }
      *
      * Subclasses can override this method with a similar code but with {@code new EPSGDataAccess(…)} replaced
      * by {@code new MyDataAccessSubclass(…)}.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
index f377a06fb8..6b7c9e097c 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
@@ -56,10 +56,10 @@ final class EPSGInstaller extends ScriptRunner {
      * The pattern for an {@code "UPDATE … SET … REPLACE"} instruction.
      * Example:
      *
-     * {@preformat sql
+     * {@snippet lang="sql" :
      *     UPDATE epsg_datum
      *     SET datum_name = replace(datum_name, CHAR(182), CHAR(10));
-     * }
+     *     }
      *
      * Note: this regular expression use a capturing group.
      */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
index 516152c8db..ba2c16efc6 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
@@ -234,28 +234,26 @@ public abstract class InstallationScriptProvider extends InstallationResources {
      * This method is invoked by the default implementation of {@link #openScript(String, int)}
      * for all scripts except {@link #PREPARE} and {@link #FINISH}.
      *
-     * <div class="note"><b>Example 1:</b>
+     * <h4>Example 1</h4>
      * if this {@code InstallationScriptProvider} instance gets the SQL scripts from files in a well-known directory
      * and if the names given at {@linkplain #InstallationScriptProvider(String, String...) construction time} are the
      * filenames in that directory, then this method can be implemented as below:
      *
-     * {@preformat java
-     *    protected InputStream openStream(String name) throws IOException {
-     *        return Files.newInputStream(directory.resolve(name));
-     *    }
+     * {@snippet lang="java" :
+     *      protected InputStream openStream(String name) throws IOException {
+     *          return Files.newInputStream(directory.resolve(name));
+     *      }
      * }
-     * </div>
      *
-     * <div class="note"><b>Example 2:</b>
+     * <h4>Example 2</h4>
      * if this {@code InstallationScriptProvider} instance rather gets the SQL scripts from resources bundled
      * in the same JAR files than and in the same package, then this method can be implemented as below:
      *
-     * {@preformat java
-     *    protected InputStream openStream(String name) {
-     *        return MyClass.getResourceAsStream(name);
-     *    }
+     * {@snippet lang="java" :
+     *      protected InputStream openStream(String name) {
+     *          return MyClass.getResourceAsStream(name);
+     *      }
      * }
-     * </div>
      *
      * @param  name  name of the script file to open. Can be {@code null} if the resource is not found.
      * @return an input stream opened of the given script file.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java
index 4df3c3a943..14d2096ebc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/TableInfo.java
@@ -257,9 +257,9 @@ final class TableInfo {
      * if such condition can be added. The clause appended by this method looks like the following example
      * (details may vary because of enumeration values):
      *
-     * {@preformat sql
-     *   WHERE COORD_REF_SYS_KIND LIKE 'geographic%' AND
-     * }
+     * {@snippet lang="sql" :
+     *     WHERE COORD_REF_SYS_KIND LIKE 'geographic%' AND
+     *     }
      *
      * In any case, the caller shall add at least one condition after this method call.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
index 48e30c93de..7e3e3ba96f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
@@ -933,11 +933,11 @@ check:      for (int isTarget=0; ; isTarget++) {        // 0 == source check; 1
      * allows a subset of coordinate operations with the ESRI-specific {@code GEOGTRAN} keyword.
      * To enabled this variant, {@link org.apache.sis.io.wkt.WKTFormat} can be configured as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     format = new WKTFormat(null, null);
      *     format.setConvention(Convention.WKT1_IGNORE_AXES);
      *     format.setNameAuthority(Citations.ESRI);
-     * }
+     *     }
      *
      * @param  formatter  the formatter to use.
      * @return {@code "CoordinateOperation"}.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
index 5aa369fa38..af2235e161 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
@@ -836,9 +836,9 @@ next:   for (int i=components.size(); --i >= 0;) {
      * CoordinateOperationContext) createOperation(…)} when no operation was found in the cache.
      * The default implementation is straightforward:
      *
-     * {@preformat java
-     *   return new CoordinateOperationFinder(registry, this, context);
-     * }
+     * {@snippet lang="java" :
+     *     return new CoordinateOperationFinder(registry, this, context);
+     *     }
      *
      * Subclasses can override this method is they want to modify the way coordinate operations are inferred.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
index 86e0d10ca0..181f6c13e9 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
@@ -904,19 +904,20 @@ public class DefaultOperationMethod extends AbstractIdentifiedObject implements
      * <p>However, it could happen that the user really wanted to specify a {@code ParameterDescriptorGroup} as
      * the sole {@code <gml:parameter>} element. We currently have no easy way to distinguish those cases.</p>
      *
-     * <div class="note"><b>Tip:</b>
+     * <h4>Tip</h4>
      * One possible way to distinguish the two cases would be to check that the parameter group does not contain
      * any property that this method does not have:
      *
-     * {@preformat java
-     *   if (IdentifiedObjects.getProperties(this).entrySet().containsAll(
-     *       IdentifiedObjects.getProperties(parameters).entrySet())) ...
-     * }
+     * {@snippet lang="java" :
+     *     if (IdentifiedObjects.getProperties(this).entrySet().containsAll(
+     *         IdentifiedObjects.getProperties(parameters).entrySet())) ...
+     *     }
      *
      * But we would need to make sure that {@link AbstractSingleOperation#getParameters()} is consistent
-     * with the decision taken by this method.</div>
+     * with the decision taken by this method.
      *
-     * <p><b>Historical note:</b> older, deprecated, names for the parameters were:
+     * <h4>Historical note</h4>
+     * Older, deprecated, names for the parameters were:
      * <ul>
      *   <li>{@code includesParameter}</li>
      *   <li>{@code generalOperationParameter} - note that this name was used by the EPSG repository</li>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
index d4e804c289..5c8c2b0c81 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LinearTransformBuilder.java
@@ -291,10 +291,10 @@ public class LinearTransformBuilder extends TransformBuilder {
      * <p>If this builder has been created for randomly distributed source points, then the allocation
      * should rather be performed as below:</p>
      *
-     * {@preformat java
-     *    sources = new double[srcDim][capacity];
-     *    targets = new double[tgtDim][capacity];
-     * }
+     * {@snippet lang="java" :
+     *     sources = new double[srcDim][capacity];
+     *     targets = new double[tgtDim][capacity];
+     *     }
      */
     private void allocate(final int tgtDim) {
         targets = new double[tgtDim][gridLength];
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java
index 3db9e31e16..c063d92abc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/builder/LocalizationGridBuilder.java
@@ -546,16 +546,15 @@ public class LocalizationGridBuilder extends TransformBuilder {
      * and are almost constant when increasing row indices. In such case, the recommended direction is 1 for comparing each
      * value with the value in previous row, since that value should be closer than the value in previous column.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * for a grid of (<var>longitude</var>, <var>latitude</var>) values in decimal degrees where longitude values
      * vary (increase or decrease) with increasing column indices and latitude values vary (increase or decrease)
      * with increasing row indices, the the following method should be invoked for protecting the grid against
      * discontinuities on anti-meridian:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     grid.resolveWraparoundAxis(0, 1, 360);
-     * }
-     * </div>
+     *     }
      *
      * @param  dimension  the dimension to process.
      *                    This is 0 for longitude dimension in a (<var>longitudes</var>, <var>latitudes</var>) grid.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
index 768058e244..ebea8bef36 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
@@ -210,9 +210,9 @@ public final class AffineTransforms2D extends Static {
      * This operation is equivalent to the following code, except that it can reuse the
      * given {@code dest} rectangle and is potentially more efficient:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return transform.createTransformedShape(bounds).getBounds2D();
-     * }
+     *     }
      *
      * Note that if the given rectangle is an image bounds, then the given transform shall map the
      * <strong>upper-left corner</strong> of pixels (as in Java2D usage), not the center of pixels
@@ -259,9 +259,9 @@ public final class AffineTransforms2D extends Static {
      * This operation is equivalent to the following code, except that it can reuse the
      * given {@code dest} rectangle and is potentially more efficient:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return createInverse().createTransformedShape(bounds).getBounds2D();
-     * }
+     *     }
      *
      * @param  transform  the affine transform to use.
      * @param  bounds     the rectangle to transform, or {@code null}.
@@ -392,7 +392,7 @@ public final class AffineTransforms2D extends Static {
      * The example below choose to apply the sign on the <var>y</var> scale, but this is an arbitrary
      * (while common) choice:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     double scaleX0 = getScaleX0(transform);
      *     double scaleY0 = getScaleY0(transform);
      *     int    flip    = getFlip(transform);
@@ -400,14 +400,14 @@ public final class AffineTransforms2D extends Static {
      *         scaleY0 *= flip;
      *         // ... continue the process here.
      *     }
-     * }
+     *     }
      *
      * This method is similar to the following code, except that this method distinguishes
      * between "unflipped" and "unknown" states.
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     boolean flipped = (tr.getType() & TYPE_FLIP) != 0;
-     * }
+     *     }
      *
      * @param  transform  the affine transform to inspect.
      * @return -1 if an axis has been flipped, +1 if no flipping, or 0 if unknown.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
index 6ba7a811a9..5f0a039c0a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
@@ -336,11 +336,11 @@ public final class Matrices extends Static {
      * envelope of size 300 × 500, and given {@linkplain Envelope#getLowerCorner() lower corner} translation
      * from (-20, -40) to (-10, -25), then the following method call:
      *
-     * {@preformat java
-     *   matrix = Matrices.createTransform(
-     *           new Envelope2D(null, -20, -40, 100, 200),
-     *           new Envelope2D(null, -10, -25, 300, 500));
-     * }
+     * {@snippet lang="java" :
+     *     matrix = Matrices.createTransform(
+     *             new Envelope2D(null, -20, -40, 100, 200),
+     *             new Envelope2D(null, -10, -25, 300, 500));
+     *     }
      *
      * will return the following square matrix. The transform of the lower corner is given as an example:
      *
@@ -413,11 +413,11 @@ public final class Matrices extends Static {
      * <h4>Example</h4>
      * The following method call:
      *
-     * {@preformat java
-     *   matrix = Matrices.createTransform(
-     *           new AxisDirection[] {AxisDirection.NORTH, AxisDirection.WEST},
-     *           new AxisDirection[] {AxisDirection.EAST, AxisDirection.NORTH});
-     * }
+     * {@snippet lang="java" :
+     *     matrix = Matrices.createTransform(
+     *             new AxisDirection[] {AxisDirection.NORTH, AxisDirection.WEST},
+     *             new AxisDirection[] {AxisDirection.EAST, AxisDirection.NORTH});
+     *     }
      *
      * will return the following square matrix, which can be used in coordinate conversions as below:
      *
@@ -476,11 +476,11 @@ public final class Matrices extends Static {
      * <div class="note"><b>Example:</b>
      * combining the examples documented in the above {@code createTransform(…)} methods, the following method call:
      *
-     * {@preformat java
-     *   matrix = Matrices.createTransform(
-     *           new Envelope2D(null, -40, +20, 200, 100), new AxisDirection[] {AxisDirection.NORTH, AxisDirection.WEST},
-     *           new Envelope2D(null, -10, -25, 300, 500), new AxisDirection[] {AxisDirection.EAST, AxisDirection.NORTH});
-     * }
+     * {@snippet lang="java" :
+     *     matrix = Matrices.createTransform(
+     *             new Envelope2D(null, -40, +20, 200, 100), new AxisDirection[] {AxisDirection.NORTH, AxisDirection.WEST},
+     *             new Envelope2D(null, -10, -25, 300, 500), new AxisDirection[] {AxisDirection.EAST, AxisDirection.NORTH});
+     *     }
      *
      * will return the following square matrix. The transform of a corner is given as an example.
      * Note that the input coordinate values are swapped because of the (<i>North</i>, <i>West</i>) axis directions,
@@ -537,9 +537,9 @@ public final class Matrices extends Static {
      * and discard the <var>z</var> values, then the indices of source coordinates to select are 1 for <var>y</var>,
      * 0 for <var>x</var> and 3 for <var>t</var>. One can use the following method call:
      *
-     * {@preformat java
-     *   matrix = Matrices.createDimensionSelect(4, new int[] {1, 0, 3});
-     * }
+     * {@snippet lang="java" :
+     *     matrix = Matrices.createDimensionSelect(4, new int[] {1, 0, 3});
+     *     }
      *
      * The above method call will create the following 4×5 matrix,
      * which can be used for converting coordinates as below:
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
index bd05331858..9fabeea73e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
@@ -406,9 +406,9 @@ public abstract class MatrixSIS implements Matrix, LenientComparable, Cloneable,
      * Returns {@code true} if this matrix is an identity matrix.
      * This method is equivalent to the following code, except that it is potentially more efficient:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return Matrices.isIdentity(this, 0.0);
-     * }
+     *     }
      *
      * @return {@code true} if this matrix is an identity matrix.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
index cd497439ac..046155ae25 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
@@ -160,7 +160,7 @@ final class Solver implements Matrix {                          // Not Cloneable
      * <p>This method does <strong>not</strong> checks the matrix size.
      * Check for matrix size shall be performed by the caller like below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     final int size = X.getNumRow();
      *     if (X.getNumCol() != size) {
      *         throw new NoninvertibleMatrixException("Matrix must be square.");
@@ -168,7 +168,7 @@ final class Solver implements Matrix {                          // Not Cloneable
      *     if (Y.getNumRow() != size) {
      *         throw new MismatchedMatrixSizeException("Matrix row dimensions must agree.");
      *     }
-     * }
+     *     }
      *
      * @param  X          the matrix to invert, which must be square.
      * @param  Y          the desired result of {@code X} × <var>U</var>.
@@ -304,12 +304,12 @@ searchNaN:  for (int flatIndex = (size - 1) * size; --flatIndex >= 0;) {
      * <p>This method does <strong>not</strong> checks the matrix size.
      * It is caller's responsibility to ensure that the following hold:</p>
      *
-     * {@preformat java
-     *   X.getNumRow() == size;
-     *   X.getNumCol() == size;
-     *   Y.getNumRow() == size;
-     *   Y.getNumCol() == innerSize;
-     * }
+     * {@snippet lang="java" :
+     *     assert X.getNumRow() == size;
+     *     assert X.getNumCol() == size;
+     *     assert Y.getNumRow() == size;
+     *     assert Y.getNumCol() == innerSize;
+     *     }
      *
      * @param  LU         elements of the {@code X} matrix to invert, including error terms.
      * @param  Y          the desired result of {@code X} × <var>U</var>.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
index 9f4113fc0e..6ac4162cbc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
@@ -129,15 +129,16 @@ public class LambertConicConformal extends ConformalProjection {
      * the normalization matrix which use that precision for "degrees to radians" conversion.
      * The goal is to have cleaner results after matrix inversions and multiplications.
      *
-     * <div class="note"><b>Tip:</b> how to verify the value:
-     * {@preformat java
+     * <h4>Tip</h4>
+     * How to verify the value:
+     *
+     * {@snippet lang="java" :
      *     BigDecimal a = new BigDecimal(BELGE_A.value);
      *     a = a.add     (new BigDecimal(BELGE_A.error));
      *     a = a.multiply(new BigDecimal("57.29577951308232087679815481410517"));
      *     a = a.multiply(new BigDecimal(60 * 60));
      *     System.out.println(a);
-     * }
-     * </div>
+     *     }
      */
     static Number belgeA() {
         return new DoubleDouble(-1.420431363598774E-4, -1.1777378450498224E-20);
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
index 88e25dc746..711a23bad8 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
@@ -510,9 +510,9 @@ public abstract class NormalizedProjection extends AbstractMathTransform2D imple
      * changes in axis order} are <strong>not</strong> managed by the returned transform.
      *
      * <p>The default implementation is as below:</p>
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return getContextualParameters().completeTransform(factory, this);
-     * }
+     *     }
      *
      * Subclasses can override this method if they wish to use alternative implementations under some circumstances.
      * For example, many subclasses will replace {@code this} by a specialized implementation if they detect that the
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
index 917a028f12..edd222a8bf 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
@@ -350,7 +350,7 @@ public abstract class AbstractMathTransform extends FormattableObject
      * derivative at that location. Invoking this method is conceptually equivalent to running
      * the following:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Matrix derivative = null;
      *     if (derivate) {
      *         double[] coordinates = Arrays.copyOfRange(srcPts, srcOff, srcOff + getSourceDimensions());
@@ -358,7 +358,7 @@ public abstract class AbstractMathTransform extends FormattableObject
      *     }
      *     this.transform(srcPts, srcOff, dstPts, dstOff, 1);                   // May overwrite srcPts.
      *     return derivative;
-     * }
+     *     }
      *
      * However, this method provides two advantages:
      *
@@ -941,9 +941,9 @@ public abstract class AbstractMathTransform extends FormattableObject
      * Compares the specified object with this math transform for strict equality.
      * This method is implemented as below (omitting assertions):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return equals(other, ComparisonMode.STRICT);
-     * }
+     *     }
      *
      * @param  object  the object to compare with this transform.
      * @return {@code true} if the given object is a transform of the same class and using the same parameter values.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
index 132711b340..6c6c7ab617 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ContextualParameters.java
@@ -617,9 +617,9 @@ public class ContextualParameters extends Parameters implements Serializable {
      * Before the call to {@link #completeTransform completeTransform(…)},
      * this method can be used for setting parameter values like below:
      *
-     * {@preformat java
-     *   parameter("Scale factor").setValue(0.9996);   // Scale factor of Universal Transverse Mercator (UTM) projections.
-     * }
+     * {@snippet lang="java" :
+     *     parameter("Scale factor").setValue(0.9996);   // Scale factor of Universal Transverse Mercator (UTM) projections.
+     *     }
      *
      * After the call to {@code completeTransform(…)}, the returned parameters are read-only.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
index f495dfc6cc..8e962271d6 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
@@ -304,13 +304,13 @@ public class DefaultMathTransformFactory extends AbstractFactory implements Math
      *   <li>All {@code OperationMethod} instances shall be thread-safe.</li>
      *   <li>The {@code Iterable} itself does not need to be thread-safe since all usages will be synchronized as below:
      *
-     *       {@preformat java
+     *       {@snippet lang="java" :
      *           synchronized (methods) {
      *               for (OperationMethod method : methods) {
      *                   // Use the method here.
      *               }
      *           }
-     *       }
+     *           }
      *   </li>
      * </ul>
      *
@@ -1164,12 +1164,12 @@ public class DefaultMathTransformFactory extends AbstractFactory implements Math
      * operation by calling {@link #getDefaultParameters(String)}, then to fill the parameter values.
      * Example:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     ParameterValueGroup group = factory.getDefaultParameters("Transverse_Mercator");
      *     group.parameter("semi_major").setValue(6378137.000);
      *     group.parameter("semi_minor").setValue(6356752.314);
      *     MathTransform mt = factory.createParameterizedTransform(group, null);
-     * }
+     *     }
      *
      * Sometimes the {@code "semi_major"} and {@code "semi_minor"} parameter values are not explicitly provided,
      * but rather inferred from the {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum geodetic
@@ -1624,10 +1624,10 @@ public class DefaultMathTransformFactory extends AbstractFactory implements Math
      *
      * The resulting transform will have the following dimensions:
      *
-     * {@preformat java
-     *     Source: firstAffectedCoordinate + subTransform.getSourceDimensions() + numTrailingCoordinates
-     *     Target: firstAffectedCoordinate + subTransform.getTargetDimensions() + numTrailingCoordinates
-     * }
+     * {@snippet lang="java" :
+     *     int sourceDim = firstAffectedCoordinate + subTransform.getSourceDimensions() + numTrailingCoordinates;
+     *     int targetDim = firstAffectedCoordinate + subTransform.getTargetDimensions() + numTrailingCoordinates;
+     *     }
      *
      * @param  firstAffectedCoordinate  the lowest index of the affected coordinates.
      * @param  subTransform             transform to use for affected coordinates.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DomainDefinition.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DomainDefinition.java
index 95c5091271..57bdd5eeb0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DomainDefinition.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DomainDefinition.java
@@ -45,12 +45,12 @@ import org.apache.sis.geometry.GeneralEnvelope;
  * instance, unless that transform is a chain of concatenated transforms (this case is handled automatically
  * by Apache SIS). Usage example:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     AbstractMathTransform transform = …;
  *     transform.getDomain(new DomainDefinition()).ifPresent((domain) -> {
  *         // Do something here with the transform domain.
  *     });
- * }
+ *     }
  *
  * The {@link MathTransforms#getDomain(MathTransform)} convenience method can be used
  * when the default implementation is sufficient.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
index fd0bca751b..fc95be1eca 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransform.java
@@ -366,15 +366,15 @@ public class EllipsoidToCentricTransform extends AbstractMathTransform implement
 
     /**
      * Creates a transform from geographic to Cartesian geocentric coordinates (convenience method).
-     * Invoking this method is equivalent to the following:
+     * This method is equivalent to the following:
      *
-     * {@preformat java
-     *     createGeodeticConversion(factory,
+     * {@snippet lang="java" :
+     *     return createGeodeticConversion(factory,
      *             ellipsoid.getSemiMajorAxis(),
      *             ellipsoid.getSemiMinorAxis(),
      *             ellipsoid.getAxisUnit(),
      *             withHeight, TargetType.CARTESIAN);
-     * }
+     *     }
      *
      * The target type is assumed Cartesian because this is the most frequently used target.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
index 933dc4e480..2eae0cddd2 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ExponentialTransform1D.java
@@ -31,7 +31,7 @@ import org.apache.sis.util.ComparisonMode;
  *
  * <blockquote><var>y</var> = {@linkplain #scale}⋅{@linkplain #base}<sup><var>x</var></sup></blockquote>
  *
- * <div class="note"><b>Tip:</b>
+ * <h2>Tip</h2>
  * if a linear transform is applied before this exponential transform, then the equation can be rewritten as:
  * <var>scale</var>⋅<var>base</var><sup><var>a</var> + <var>b</var>⋅<var>x</var></sup> =
  * <var>scale</var>⋅<var>base</var><sup><var>a</var></sup>⋅(<var>base</var><sup><var>b</var></sup>)<sup><var>x</var></sup>
@@ -39,11 +39,10 @@ import org.apache.sis.util.ComparisonMode;
  * It is possible to find back the coefficients of the original linear transform by
  * pre-concatenating a logarithmic transform before the exponential one, as below:
  *
- * {@preformat java
- *   LinearTransform1D linear = MathTransforms.create(exponentialTransform,
- *           LogarithmicTransform1D.create(base, -Math.log(scale) / Math.log(base)));
- * }
- * </div>
+ * {@snippet lang="java" :
+ *     LinearTransform1D linear = MathTransforms.create(exponentialTransform,
+ *             LogarithmicTransform1D.create(base, -Math.log(scale) / Math.log(base)));
+ *     }
  *
  * <h2>Serialization</h2>
  * Serialized instances of this class are not guaranteed to be compatible with future SIS versions.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
index cb8b62351c..7c92fab53f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
@@ -405,15 +405,15 @@ public class InterpolatedGeocentricTransform extends DatumShiftTransform {
      * Computes the derivative by concatenating the "geographic to geocentric" and "geocentric to geographic" matrix,
      * with the {@linkplain #scale} factor between them.
      *
-     * <div class="note"><b>Note:</b>
+     * <h4>Note</h4>
      * we could improve a little bit the precision by computing the derivative in the interpolation grid:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     grid.derivativeInCell(grid.normalizedToGridX(λ), grid.normalizedToGridY(φ));
-     * }
+     *     }
      *
      * But this is a little bit complicated (need to convert to normalized units and divide by the grid
-     * cell size) for a very small difference. For now we neglect that part.</div>
+     * cell size) for a very small difference. For now we neglect that part.
      *
      * @param  m1  the derivative computed by the "geographic to geocentric" conversion.
      * @param  m2  the derivative computed by the "geocentric to geographic" conversion.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
index e750c54944..2b8f4f5922 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
@@ -31,9 +31,9 @@ package org.apache.sis.referencing.operation.transform;
  * The following code gives a skeleton for a {@code AbstractMathTransform} implementation
  * capable to transform an array of {@code double} coordinates:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public class MyTransform extends AbstractMathTransform {
- *         &#64;Override
+ *         @Override
  *         public void transform(double[] srcPts, int srcOff,
  *                               double[] dstPts, int dstOff, int numPts)
  *         {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransformProvider.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransformProvider.java
index 498f66f09d..7ae2a8c250 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransformProvider.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransformProvider.java
@@ -49,7 +49,7 @@ import org.opengis.referencing.operation.MathTransformFactory;
  * While not mandatory, we suggest to extend {@link org.apache.sis.referencing.operation.DefaultOperationMethod}.
  * Example:
  *
- * <div class="note">{@preformat java
+ * {@snippet lang="java" :
  *     public class MyProjectionProvider extends DefaultOperationMethod implements MathTransformProvider {
  *         public MyProjectionProvider() {
  *             super(Map.of(NAME_KEY, "My projection"),
@@ -58,7 +58,7 @@ import org.opengis.referencing.operation.MathTransformFactory;
  *                     parameters);
  *         }
  *
- *         &#64;Override
+ *         @Override
  *         public MathTransform createMathTransform(MathTransformFactory factory, ParameterValueGroup parameters) {
  *             double semiMajor = values.parameter("semi_major").doubleValue(Units.METRE);
  *             double semiMinor = values.parameter("semi_minor").doubleValue(Units.METRE);
@@ -66,14 +66,14 @@ import org.opengis.referencing.operation.MathTransformFactory;
  *             return new MyProjection(semiMajor, semiMinor, ...);
  *         }
  *     }
- * }</div>
+ * }
  *
  * Then the fully-qualified class name of that implementation should be listed in a file reachable on the classpath
  * with this exact name:
  *
- * {@preformat text
+ * {@snippet :
  *     META-INF/services/org.opengis.referencing.operation.OperationMethod
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys, IRD)
  * @version 0.6
@@ -90,11 +90,11 @@ public interface MathTransformProvider {
     /**
      * Creates a math transform from the specified group of parameter values.
      *
-     * <div class="note"><b>Implementation example:</b>
+     * <h4>Implementation example</h4>
      * The following example shows how parameter values can be extracted
      * before to instantiate the transform:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     public MathTransform createMathTransform(MathTransformFactory factory, ParameterValueGroup parameters) {
      *         double semiMajor = values.parameter("semi_major").doubleValue(Units.METRE);
      *         double semiMinor = values.parameter("semi_minor").doubleValue(Units.METRE);
@@ -102,7 +102,6 @@ public interface MathTransformProvider {
      *         return new MyProjection(semiMajor, semiMinor, ...);
      *     }
      * }
-     * </div>
      *
      * <h4>Purpose of the factory argument</h4>
      * Some math transforms may actually be implemented as a chain of operation steps, for example a
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
index 54b7530121..a1c6e2321f 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
@@ -332,10 +332,10 @@ public final class MathTransforms extends Static {
      * Creates a transform which passes through a subset of coordinates to another transform.
      * This method returns a transform having the following dimensions:
      *
-     * {@preformat java
-     *     Source: firstAffectedCoordinate + subTransform.getSourceDimensions() + numTrailingCoordinates
-     *     Target: firstAffectedCoordinate + subTransform.getTargetDimensions() + numTrailingCoordinates
-     * }
+     * {@snippet lang="java" :
+     *     int sourceDim = firstAffectedCoordinate + subTransform.getSourceDimensions() + numTrailingCoordinates;
+     *     int targetDim = firstAffectedCoordinate + subTransform.getTargetDimensions() + numTrailingCoordinates;
+     *     }
      *
      * Affected coordinates will range from {@code firstAffectedCoordinate} inclusive to
      * {@code dimTarget - numTrailingCoordinates} exclusive.
@@ -684,12 +684,12 @@ public final class MathTransforms extends Static {
      * is returned. Invoking this method is equivalent to the following code, except that it may
      * execute faster with some {@code MathTransform} implementations:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     DirectPosition ptSrc = ...;
      *     DirectPosition ptDst = ...;
      *     Matrix matrixDst = derivative(ptSrc);
      *     ptDst = transform(ptSrc, ptDst);
-     * }
+     *     }
      *
      * @param  transform  the transform to use.
      * @param  srcPts     the array containing the source coordinate.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
index bca6072735..dcf82654a5 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
@@ -45,15 +45,16 @@ import static org.apache.sis.util.ArgumentChecks.*;
  * Transform which passes through a subset of coordinates to another transform.
  * This allows transforms to operate on a subset of coordinate values.
  *
- * <div class="note"><b>Example:</b> giving (<var>latitude</var>, <var>longitude</var>, <var>height</var>) coordinates,
- * {@code PassThroughTransform} can convert the height values from feet to meters without affecting the latitude and
- * longitude values. Such transform can be built as below:
+ * <h2>Example</h2>
+ * Giving (<var>latitude</var>, <var>longitude</var>, <var>height</var>) coordinates,
+ * {@code PassThroughTransform} can convert the height values from feet to meters
+ * without affecting the latitude and longitude values.
+ * Such transform can be built as below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     MathTransform feetToMetres = MathTransforms.linear(0.3048, 0);       // One-dimensional conversion.
  *     MathTransform tr = MathTransforms.passThrough(2, feetToMetres, 0);   // Three-dimensional conversion.
- * }
- * </div>
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * {@code PassThroughTransform} is immutable and thread-safe if its {@linkplain #subTransform} is also
@@ -138,10 +139,10 @@ public class PassThroughTransform extends AbstractMathTransform implements Seria
      * Creates a transform which passes through a subset of coordinates to another transform.
      * This method returns a transform having the following dimensions:
      *
-     * {@preformat java
-     *     Source: firstAffectedCoordinate + subTransform.getSourceDimensions() + numTrailingCoordinates
-     *     Target: firstAffectedCoordinate + subTransform.getTargetDimensions() + numTrailingCoordinates
-     * }
+     * {@snippet lang="java" :
+     *     int sourceDim = firstAffectedCoordinate + subTransform.getSourceDimensions() + numTrailingCoordinates;
+     *     int targetDim = firstAffectedCoordinate + subTransform.getTargetDimensions() + numTrailingCoordinates;
+     *     }
      *
      * Affected coordinates will range from {@code firstAffectedCoordinate} inclusive to
      * {@code dimTarget - numTrailingCoordinates} exclusive.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java
index c209a8cfb2..c46681b4e9 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java
@@ -36,18 +36,18 @@ import org.apache.sis.util.ArraysExt;
  * Given an arbitrary {@link MathTransform}, this class tries to return a new math transform that operates
  * only on a given set of source or target dimensions.
  *
- * <div class="note"><b>Example:</b>
- * if the supplied {@code transform} has (<var>x</var>,<var>y</var>,<var>z</var>) inputs
+ * <h2>Example</h2>
+ * If the supplied {@code transform} has (<var>x</var>,<var>y</var>,<var>z</var>) inputs
  * and (<var>λ</var>,<var>φ</var>,<var>h</var>) outputs, then the following code:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     TransformSeparator s = new TransformSeparator(theTransform);
  *     s.addSourceDimensionRange(0, 2);
  *     MathTransform mt = s.separate();
- * }
+ *     }
  *
  * will return a transform with (<var>x</var>,<var>y</var>) inputs and (probably) (<var>λ</var>,<var>φ</var>) outputs.
- * The output dimensions can be verified with a call to {@link #getTargetDimensions()}.</div>
+ * The output dimensions can be verified with a call to {@link #getTargetDimensions()}.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.1
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/WraparoundTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/WraparoundTransform.java
index abf51c7e2d..7ffb868641 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/WraparoundTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/WraparoundTransform.java
@@ -300,9 +300,9 @@ public class WraparoundTransform extends AbstractMathTransform implements Serial
      * It provides a single method to override if a different wraparound strategy is desired.
      * The default implementation is:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return Math.IEEEremainder(x, period);
-     * }
+     *     }
      *
      * Subclasses may override this method for applying wraparound only under some conditions,
      * in order to reduce discontinuities.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
index 2a78db869e..2411497392 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
@@ -46,19 +46,19 @@
  * The following example projects a (<var>latitude</var>, <var>longitude</var>) coordinate to
  * a <cite>Universal Transverse Mercator</cite> projection in the zone of the coordinate:
  *
- * {@preformat java
- *   GeographicCRS source = CommonCRS.WGS84.geographic();
- *   ProjectedCRS  target = CommonCRS.WGS84.UTM(20, 30);                        // 20°N 30°E   (watch out axis order!)
- *   CoordinateOperation operation = CRS.findOperation(source, target, null);
- *   if (CRS.getLinearAccuracy(operation) > 100) {
- *       // If the accuracy is coarser than 100 metres (or any other threshold at application choice)
- *       // maybe the operation is not suitable. Decide here what to do (throw an exception, etc).
- *   }
- *   MathTransform mt = operation.getMathTransform();
- *   DirectPosition position = new DirectPosition2D(20, 30);                    // 20°N 30°E   (watch out axis order!)
- *   position = mt.transform(position, position);
- *   System.out.println(position);
- * }
+ * {@snippet lang="java" :
+ *     GeographicCRS source = CommonCRS.WGS84.geographic();
+ *     ProjectedCRS  target = CommonCRS.WGS84.UTM(20, 30);                        // 20°N 30°E   (watch out axis order!)
+ *     CoordinateOperation operation = CRS.findOperation(source, target, null);
+ *     if (CRS.getLinearAccuracy(operation) > 100) {
+ *         // If the accuracy is coarser than 100 metres (or any other threshold at application choice)
+ *         // maybe the operation is not suitable. Decide here what to do (throw an exception, etc).
+ *     }
+ *     MathTransform mt = operation.getMathTransform();
+ *     DirectPosition position = new DirectPosition2D(20, 30);                    // 20°N 30°E   (watch out axis order!)
+ *     position = mt.transform(position, position);
+ *     System.out.println(position);
+ *     }
  *
  * <h2>The EPSG database</h2>
  * The EPSG geodetic parameter dataset is a structured database required to:
@@ -85,10 +85,10 @@
  * of type <cite>geodetic datum</cite> is associated to code {@code EPSG:6326}.
  * This means that the EPSG object could be obtained by the following code:
  *
- * {@preformat java
- *   DatumAuthorityFactory factory = ...; // TODO: document how to obtain an EPSG factory.
- *   GeodeticDatum datum = factory.createGeodeticDatum("6326");
- * }
+ * {@snippet lang="java" :
+ *     DatumAuthorityFactory factory = ...;             // TODO: document how to obtain an EPSG factory.
+ *     GeodeticDatum datum = factory.createGeodeticDatum("6326");
+ *     }
  *
  * The EPSG objects can also be inspected online on the <a href="https://epsg.org/">EPSG repository</a> web site.
  *
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java b/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java
index 9433d0f367..089342224b 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java
@@ -99,8 +99,8 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   GEODCRS[“WGS 84”,
+     * {@snippet lang="wkt" :
+     *  GEODCRS[“WGS 84”,
      *    DATUM[“World Geodetic System 1984”,
      *      ELLIPSOID[“WGS 84”, 6378137, 298.257223563,
      *        LENGTHUNIT[“metre”,1.0]]],
@@ -108,7 +108,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      AXIS[“(lat)”,north,ANGLEUNIT[“degree”,0.0174532925199433]],
      *      AXIS[“(lon)”,east,ANGLEUNIT[“degree”,0.0174532925199433]],
      *      AXIS[“ellipsoidal height (h)”,up,LENGTHUNIT[“metre”,1.0]]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -125,8 +125,8 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   GEODCRS[“S-95”,
+     * {@snippet lang="wkt" :
+     *  GEODCRS[“S-95”,
      *    DATUM[“Pulkovo 1995”,
      *      ELLIPSOID[“Krassowsky 1940”, 6378245, 298.3,
      *        LENGTHUNIT[“metre”,1.0]]],
@@ -135,7 +135,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      AXIS[“longitude”,east,ORDER[2]],
      *      ANGLEUNIT[“degree”,0.0174532925199433],
      *    REMARK[“Система Геодеэических Координвт года 1995(СК-95)”]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -152,8 +152,8 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   GEODCRS[“NAD83”,
+     * {@snippet lang="wkt" :
+     *  GEODCRS[“NAD83”,
      *    DATUM[“North American Datum 1983”,
      *      ELLIPSOID[“GRS 1980”, 6378137, 298.257222101, LENGTHUNIT[“metre”,1.0]]],
      *    CS[ellipsoidal,2],
@@ -162,7 +162,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      ANGLEUNIT[“degree”,0.017453292519943],
      *    ID[“EPSG”,4269],
      *    REMARK[“1986 realisation”]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -179,8 +179,8 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   GEODCRS[“NTF (Paris)”,
+     * {@snippet lang="wkt" :
+     *  GEODCRS[“NTF (Paris)”,
      *    DATUM[“Nouvelle Triangulation Francaise”,
      *      ELLIPSOID[“Clarke 1880 (IGN)”, 6378249.2, 293.4660213]],
      *    PRIMEM[“Paris”,2.5969213],
@@ -189,7 +189,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      AXIS[“longitude”,east,ORDER[2]],
      *      ANGLEUNIT[“grad”,0.015707963267949],
      *    REMARK[“Nouvelle Triangulation Française”]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -206,8 +206,8 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   GEODETICCRS[“JGD2000”,
+     * {@snippet lang="wkt" :
+     *  GEODETICCRS[“JGD2000”,
      *    DATUM[“Japanese Geodetic Datum 2000”,
      *      ELLIPSOID[“GRS 1980”, 6378137, 298.257222101]],
      *    CS[Cartesian,3],
@@ -221,7 +221,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *    TIMEEXTENT[2002-04-01,2011-10-21],
      *    ID[“EPSG”,4946,URI[“urn:ogc:def:crs:EPSG::4946”]],
      *    REMARK[“注:JGD2000ジオセントリックは現在JGD2011に代わりました。”]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -253,8 +253,8 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   PROJCRS[“NAD27 / Texas South Central”,
+     * {@snippet lang="wkt" :
+     *  PROJCRS[“NAD27 / Texas South Central”,
      *    BASEGEODCRS[“NAD27”,
      *      DATUM[“North American Datum 1927”,
      *        ELLIPSOID[“Clarke 1866”, 20925832.164, 294.97869821,
@@ -278,7 +278,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      AXIS[“(y)”,north],
      *      LENGTHUNIT[“US survey foot”,0.304800609601219],
      *    REMARK[“Fundamental point: Meade’s Ranch KS, latitude 39°13'26.686"N, longitude 98°32'30.506"W.”]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -337,12 +337,12 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis name and vertical datum type.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   VERTCRS[“NAVD88”,
+     * {@snippet lang="wkt" :
+     *  VERTCRS[“NAVD88”,
      *    VDATUM[“North American Vertical Datum 1988”],
      *    CS[vertical,1],
      *      AXIS[“gravity-related height (H)”,up],LENGTHUNIT[“metre”,1.0]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -362,11 +362,11 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis name.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   TIMECRS[“GPS Time”,
-     *     TDATUM[“Time origin”,TIMEORIGIN[1980-01-01T00:00:00.0Z]],
-     *     CS[temporal,1],AXIS[“time”,future],TIMEUNIT[“day”,86400.0]]
-     * }
+     * {@snippet lang="wkt" :
+     *  TIMECRS[“GPS Time”,
+     *    TDATUM[“Time origin”,TIMEORIGIN[1980-01-01T00:00:00.0Z]],
+     *    CS[temporal,1],AXIS[“time”,future],TIMEUNIT[“day”,86400.0]]
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -385,13 +385,13 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis name.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   PARAMETRICCRS[“WMO standard atmosphere layer 0”,
-     *     PDATUM[“Mean Sea Level”,ANCHOR[“1013.25 hPa at 15°C”]],
-     *     CS[parametric,1],
-     *     AXIS[“pressure (hPa)”,up],
-     *     PARAMETRICUNIT[“hPa”,100.0]]
-     * }
+     * {@snippet lang="wkt" :
+     *  PARAMETRICCRS[“WMO standard atmosphere layer 0”,
+     *    PDATUM[“Mean Sea Level”,ANCHOR[“1013.25 hPa at 15°C”]],
+     *    CS[parametric,1],
+     *    AXIS[“pressure (hPa)”,up],
+     *    PARAMETRICUNIT[“hPa”,100.0]]
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -410,15 +410,15 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   ENGINEERINGCRS[“Astra Minas Grid”,
+     * {@snippet lang="wkt" :
+     *  ENGINEERINGCRS[“Astra Minas Grid”,
      *    ENGINEERINGDATUM[“Astra Minas”],
      *    CS[Cartesian,2],
      *      AXIS[“northing (X)”,north,ORDER[1]],
      *      AXIS[“westing (Y)”,west,ORDER[2]],
      *      LENGTHUNIT[“metre”,1.0],
      *    ID[“EPSG”,5800]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -438,15 +438,15 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   ENGCRS[“A construction site CRS”,
+     * {@snippet lang="wkt" :
+     *  ENGCRS[“A construction site CRS”,
      *    EDATUM[“P1”,ANCHOR[“Peg in south corner”]],
      *    CS[Cartesian,2],
      *      AXIS[“site east”,southWest,ORDER[1]],
      *      AXIS[“site north”,southEast,ORDER[2]],
      *      LENGTHUNIT[“metre”,1.0],
      *    TIMEEXTENT[“date/time t1”,“date/time t2”]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -466,15 +466,15 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
-     *   ENGCRS[“A ship-centred CRS”,
+     * {@snippet lang="wkt" :
+     *  ENGCRS[“A ship-centred CRS”,
      *    EDATUM[“Ship reference point”,ANCHOR[“Centre of buoyancy”]],
      *    CS[Cartesian,3],
      *      AXIS[“(x)”,forward],
      *      AXIS[“(y)”,starboard],
      *      AXIS[“(z)”,down],
      *      LENGTHUNIT[“metre”,1.0]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -500,7 +500,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *  GEODCRS[“ETRS89 Lambert Azimuthal Equal Area CRS”,
      *    BASEGEODCRS[“WGS 84”,
      *      DATUM[“WGS 84”,
@@ -517,7 +517,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      AXIS[“latitude”,north,ORDER[1]],
      *      AXIS[“longitude”,east,ORDER[2]],
      *      ANGLEUNIT[“degree”,0.0174532925199433]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -534,7 +534,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *  ENGCRS[“Topocentric example A”,
      *    BASEGEODCRS[“WGS 84”,
      *      DATUM[“WGS 84”,
@@ -552,7 +552,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      AXIS[“Topocentric North (V)”,north,ORDER[2]],
      *      AXIS[“Topocentric height (W)”,up,ORDER[3]],
      *      LENGTHUNIT[“metre”,1.0]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -594,7 +594,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *  COMPOUNDCRS[“NAD83 + NAVD88”,
      *    GEODCRS[“NAD83”,
      *      DATUM[“North American Datum 1983”,
@@ -610,7 +610,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *        CS[vertical,1],
      *          AXIS[“gravity-related height (H)”,up],
      *          LENGTHUNIT[“metre”,1]]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -631,7 +631,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *  COMPOUNDCRS[“GPS position and time”,
      *    GEODCRS[“WGS 84”,
      *      DATUM[“World Geodetic System 1984”,
@@ -645,7 +645,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *      CS[temporal,1],
      *        AXIS[“time (T)”,future],
      *        TIMEUNIT[“day”,86400]]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
@@ -666,7 +666,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      * Completes the GeoAPI tests with a check of axis names.
      * The WKT parsed by this test is (except for quote characters):
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *  COMPOUNDCRS[“ICAO layer 0”,
      *    GEODETICCRS[“WGS 84”,
      *      DATUM[“World Geodetic System 1984”,
@@ -682,7 +682,7 @@ public final strictfp class WKTParserTest extends CRSParserTest {
      *          CS[parametric,1],
      *            AXIS[“pressure (P)”,unspecified],
      *            PARAMETRICUNIT[“hPa”,100]]]
-     * }
+     *  }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
      */
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/TestFactorySource.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/TestFactorySource.java
index 7e6b4f481d..ec65ab78ce 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/TestFactorySource.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/TestFactorySource.java
@@ -37,18 +37,18 @@ import static org.opengis.test.Assert.*;
  * This is the common class used by all tests that need a full EPSG geodetic dataset to be installed.
  * Use this class as below:
  *
- * {@preformat java
- *     &#64;BeforeClass
+ * {@snippet lang="java" :
+ *     @BeforeClass
  *     public static void createFactory() throws FactoryException {
  *         TestFactorySource.createFactory();
  *     }
  *
- *     &#64;AfterClass
+ *     @AfterClass
  *     public static void close() throws FactoryException {
  *         TestFactorySource.close();
  *     }
  *
- *     &#64;Test
+ *     @Test
  *     public void testFoo() {
  *         assumeNotNull(TestFactorySource.factory);
  *         // Test can happen now.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java
index cbfb56a029..d43ef3c9d9 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java
@@ -92,9 +92,9 @@ public final strictfp class CoordinateOperationFinderTest extends MathTransformT
      * Tolerance threshold for strict comparisons of floating point numbers.
      * This constant can be used like below, where {@code expected} and {@code actual} are {@code double} values:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assertEquals(expected, actual, STRICT);
-     * }
+     *     }
      */
     private static final double STRICT = 0;
 
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java
index b498116bef..21cd60e843 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationRegistryTest.java
@@ -81,9 +81,9 @@ public final strictfp class CoordinateOperationRegistryTest extends MathTransfor
      * Tolerance threshold for strict comparisons of floating point numbers.
      * This constant can be used like below, where {@code expected} and {@code actual} are {@code double} values:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assertEquals(expected, actual, STRICT);
-     * }
+     *     }
      */
     private static final double STRICT = 0;
 
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactoryTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactoryTest.java
index 6b1a6b19af..2ea8af8213 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactoryTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactoryTest.java
@@ -70,9 +70,9 @@ public final strictfp class DefaultCoordinateOperationFactoryTest extends MathTr
      * Tolerance threshold for strict comparisons of floating point numbers.
      * This constant can be used like below, where {@code expected} and {@code actual} are {@code double} values:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assertEquals(expected, actual, STRICT);
-     * }
+     *     }
      */
     private static final double STRICT = 0;
 
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/HardCodedConversions.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/HardCodedConversions.java
index 974dfbdf6a..5678c5f081 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/HardCodedConversions.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/HardCodedConversions.java
@@ -56,12 +56,12 @@ public final strictfp class HardCodedConversions {
      * A defining conversion for a <cite>Universal Transverse Mercator zone 9</cite> projection.
      * Pseudo Well-Known Text for the {@link org.opengis.referencing.operation.MathTransform}:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   Param_MT["Transverse Mercator",
      *       Parameter["Longitude of natural origin", -129, Unit["degree"]],
      *       Parameter["Scale factor at natural origin", 0.9996],
      *       Parameter["False easting", 500000, Unit["metre"]]]]
-     * }
+     *   }
      */
     public static final DefaultConversion UTM;
     static {
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
index b0bda449b0..c1b3631671 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
@@ -263,7 +263,7 @@ public final strictfp class AlbersEqualAreaTest extends MapProjectionTestCase {
      * in trigonometric functions. The range reduction must be performed explicitly in map projection code.
      *
      * <p>The math transform tested here is:</p>
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   Param_MT["Albers Equal Area",
      *     Parameter["semi_major", 6378206.4, Unit["metre"]],
      *     Parameter["semi_minor", 6356583.8, Unit["metre"]],
@@ -271,7 +271,7 @@ public final strictfp class AlbersEqualAreaTest extends MapProjectionTestCase {
      *     Parameter["Longitude of false origin", -154, Unit["degree"]],
      *     Parameter["Latitude of 1st standard parallel", 55, Unit["degree"]],
      *     Parameter["Latitude of 2nd standard parallel", 65, Unit["degree"]]]
-     * }
+     *   }
      *
      * @throws FactoryException if an error occurred while creating the map projection.
      * @throws TransformException if an error occurred while projecting a point.
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PoleRotationTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PoleRotationTest.java
index b0c50633df..0c003cff25 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PoleRotationTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PoleRotationTest.java
@@ -244,10 +244,10 @@ public final strictfp class PoleRotationTest extends MathTransformTestCase {
      * {@code coords.txt} is a file containing input coordinates in (λ,φ)
      * order and the output is in (φ,λ) order.
      *
-     * {@preformat shell
+     * {@snippet lang="shell" :
      *   cs2cs -I -E -f %g "EPSG:4326" +to +type=crs +proj=ob_tran +o_proj=longlat +datum=WGS84 +no_defs \
      *         +o_lat_p=70 +o_lon_p=40 +lon_0=190 coords.txt
-     * }
+     *   }
      *
      * Note that a 180° offset must be added to the {@code +lon_0} parameter.
      *
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
index a911deb561..6d06bf989d 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
@@ -96,12 +96,12 @@ public class ConverterRegistry {
      * fetch the {@code ObjectConverter} instances from the {@code META-INF/services}
      * directories as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     ClassLoader loader = getClass().getClassLoader();
      *     for (ObjectConverter<?,?> converter : ServiceLoader.load(ObjectConverter.class, loader)) {
      *         register(converter);
      *     }
-     * }
+     *     }
      */
     protected void initialize() {
     }
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java
index d0569269f9..182ed6530a 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java
@@ -133,11 +133,11 @@ final class FallbackConverter<S,T> extends SystemConverter<S,T> {
      * erasure, and should not need that information if we didn't made a mistake in this class.
      * Nevertheless for safety, callers are encouraged to verify themselves as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Class<T> targetClass = ...;
      *     FallbackConverter<S, ? extends T> converter = merge(...);
      *     assert targetClass.isAssignableFrom(converter.getTargetClass()) : converter;
-     * }
+     *     }
      *
      * In the current implementation, the {@code primary} converter can be either an arbitrary
      * {@code ObjectConverter}, or a previously created {@code FallbackConverter}. However, the
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java
index 8dcd6cdbfb..30f405ce1b 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java
@@ -29,10 +29,10 @@ import org.apache.sis.math.FunctionProperty;
  * <p>Some predefined unique instances of {@code ObjectToString} are available
  * by the following pattern:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Class<S> sourceClass = ...;
  *     ObjectConverter<S,String> c = StringConverter.getInstance(sourceClass).inverse();
- * }
+ *     }
  *
  * <h2>Immutability and thread safety</h2>
  * This base class and all inner classes are immutable, and thus inherently thread-safe.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
index 97a3079ab5..d8c0990dab 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
@@ -97,12 +97,12 @@ public final class SystemRegistry extends ConverterRegistry {
      * <p>The default implementation is equivalent to the following code
      * (see the package javadoc for more information):</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     ClassLoader loader = getClass().getClassLoader();
      *     for (ObjectConverter<?,?> converter : ServiceLoader.load(ObjectConverter.class, loader)) {
      *         register(converter);
      *     }
-     * }
+     *     }
      */
     @Override
     protected void initialize() {
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/DaemonThread.java b/core/sis-utility/src/main/java/org/apache/sis/internal/system/DaemonThread.java
index 6f925ae0cc..06e879f95f 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/DaemonThread.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/DaemonThread.java
@@ -26,17 +26,17 @@ import java.util.ArrayList;
  * This class provides a {@link #isKillRequested()} flag which shall be tested by the subclasses.
  * It is okay to test this flag only when catching {@link InterruptedException}, as below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     while (true) {
  *         try {
  *             someObject.wait();
  *         } catch (InterruptedException e) {
  *             if (isKillRequested()) {
- *                 break; // Exit the loop for stopping the thread.
+ *                 break;                       // Exit the loop for stopping the thread.
  *             }
  *         }
  *     }
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.3
@@ -67,7 +67,7 @@ abstract class DaemonThread extends Thread {
      * required in OSGi environment). Each module using {@code DaemonThread} shall maintain
      * its <strong>own</strong> list (don't use the list of another module), like below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     class MyInternalClass {
      *         static DaemonThread lastCreatedDaemon;
      *     }
@@ -81,7 +81,7 @@ abstract class DaemonThread extends Thread {
      *             }
      *         }
      *     }
-     * }
+     *     }
      *
      * See {@link ReferenceQueueConsumer} for a real example.
      *
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java b/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
index 19be39c31a..08e0c210da 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/OptionalDependency.java
@@ -57,8 +57,8 @@ public abstract class OptionalDependency extends SystemListener {
      * Invoked when the classpath is likely to have changed.
      * Subclasses must override like below:
      *
-     * {@preformat java
-     *     &#64;Override
+     * {@snippet lang="java" :
+     *     @Override
      *     protected final void classpathChanged() {
      *         synchronized (MyServices.class) {
      *             super.classpathChanged();
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java b/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
index a9a5cdf033..e8e3add4c5 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/ReferenceQueueConsumer.java
@@ -33,19 +33,19 @@ import static java.util.logging.Logger.getLogger;
  *
  * Example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     final class MyReference extends WeakReference<MyType> implements Disposable {
  *         MyReference(MyType referent) {
  *             super(referent, ReferenceQueueConsumer.QUEUE);
  *         }
  *
- *         &#64;Override
+ *         @Override
  *         public void dispose() {
  *             // Perform here some cleaning work that must be done when the referent has
  *             // been garbage-collected. Remember that get() returns null from this point.
  *         }
  *     }
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.3
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
index f2809bed5a..ac8a5b0162 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/DoubleDouble.java
@@ -42,9 +42,9 @@ import org.apache.sis.math.DecimalFunctions;
  * more compact storage and better performance. {@code DoubleDouble} can be converted to {@code BigDecimal} as
  * below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     BigDecimal decimal = new BigDecimal(dd.value).add(new BigDecimal(dd.error));
- * }
+ *     }
  *
  * <h2>Impact of availability of FMA instructions</h2>
  * When allowed to use <cite>fused multiply-add</cite> (FMA) instruction added in JDK9
@@ -97,7 +97,7 @@ public final class DoubleDouble extends Number {
      * The split constant used as part of multiplication algorithms. The split algorithm is as below
      * (we have to inline it in multiplication methods because Java cannot return multi-values):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     private void split(double a) {
      *         double t   = SPLIT * a;
      *         double ahi = t - (t - a);
@@ -428,10 +428,10 @@ public final class DoubleDouble extends Number {
      * Sets the {@link #value} and {@link #error} terms to values read from the given array.
      * This is a convenience method for a frequently used operation, implemented as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   value = array[index];
      *   error = array[index + errorOffset];
-     * }
+     *   }
      *
      * @param  array        the array from which to get the value and error.
      * @param  index        index of the value in the given array.
@@ -506,10 +506,10 @@ public final class DoubleDouble extends Number {
      * Stores the {@link #value} and {@link #error} terms in the given array.
      * This is a convenience method for a frequently used operation, implemented as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   array[index] = value;
      *   array[index + errorOffset] = error;
-     * }
+     *   }
      *
      * @param  array        the array where to store the value and error.
      * @param  index        index of the value in the given array.
@@ -551,9 +551,9 @@ public final class DoubleDouble extends Number {
      * Adds another double-double value to this {@code DoubleDouble}.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    add(other.value, other.error);
-     * }
+     * {@snippet lang="java" :
+     *   add(other.value, other.error);
+     *   }
      *
      * @param  other  the other value to add to this {@code DoubleDouble}.
      */
@@ -581,9 +581,9 @@ public final class DoubleDouble extends Number {
      * Adds a {@code double} value to this {@code DoubleDouble} with a default error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    add(otherValue, errorForWellKnownValue(otherValue));
-     * }
+     * {@snippet lang="java" :
+     *   add(otherValue, errorForWellKnownValue(otherValue));
+     *   }
      *
      * <b>Tip:</b> if the other value is known to be an integer or a power of 2, then invoking
      * <code>{@linkplain #add(double) add}(otherValue)</code> is more efficient.
@@ -610,9 +610,9 @@ public final class DoubleDouble extends Number {
      * Adds a {@code double} value to this {@code DoubleDouble} without error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    add(otherValue, 0);
-     * }
+     * {@snippet lang="java" :
+     *   add(otherValue, 0);
+     *   }
      *
      * @param  otherValue  the other value to add to this {@code DoubleDouble}.
      */
@@ -637,13 +637,13 @@ public final class DoubleDouble extends Number {
      * keeping in mind that the result of (a.value + b.value) has itself an error
      * which needs to be added to (a.error + b.error). In Java code:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   final double thisError = this.error;
      *   setToSum(value, otherValue);
      *   error += thisError;
      *   error += otherError;
      *   setToQuickSum(value, error);
-     * }
+     *   }
      *
      * @param  otherValue  the other value to add to this {@code DoubleDouble}.
      * @param  otherError  the error of the other value to add to this {@code DoubleDouble}.
@@ -675,9 +675,9 @@ public final class DoubleDouble extends Number {
      * Adds another double-double value to this {@code DoubleDouble}, reading the values from an array.
      * This is a convenience method for a frequently used operation, implemented as below:
      *
-     * {@preformat java
-     *    add(array[index], array[index + errorOffset]);
-     * }
+     * {@snippet lang="java" :
+     *   add(array[index], array[index + errorOffset]);
+     *   }
      *
      * @param  array        the array from which to get the value and error.
      * @param  index        index of the value in the given array.
@@ -691,9 +691,9 @@ public final class DoubleDouble extends Number {
      * Subtracts another double-double value from this {@code DoubleDouble}.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    subtract(other.value, other.error);
-     * }
+     * {@snippet lang="java" :
+     *   subtract(other.value, other.error);
+     *   }
      *
      * @param  other  the other value to subtract from this value.
      */
@@ -721,9 +721,9 @@ public final class DoubleDouble extends Number {
      * Subtracts a {@code double} from this {@code DoubleDouble} with a default error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    subtract(otherValue, errorForWellKnownValue(otherValue));
-     * }
+     * {@snippet lang="java" :
+     *   subtract(otherValue, errorForWellKnownValue(otherValue));
+     *   }
      *
      * <b>Tip:</b> if the other value is known to be an integer or a power of 2, then invoking
      * <code>{@linkplain #subtract(double) subtract}(otherValue)</code> is more efficient.
@@ -738,9 +738,9 @@ public final class DoubleDouble extends Number {
      * Subtracts a {@code double} from this {@code DoubleDouble} without error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    subtract(otherValue, 0);
-     * }
+     * {@snippet lang="java" :
+     *   subtract(otherValue, 0);
+     *   }
      *
      * @param  otherValue  the other value to subtract from this {@code DoubleDouble}.
      */
@@ -763,9 +763,9 @@ public final class DoubleDouble extends Number {
      * Subtracts another double-double value from this {@code DoubleDouble}, reading the values from an array.
      * This is a convenience method for a frequently used operation, implemented as below:
      *
-     * {@preformat java
-     *    subtract(array[index], array[index + errorOffset]);
-     * }
+     * {@snippet lang="java" :
+     *   subtract(array[index], array[index + errorOffset]);
+     *   }
      *
      * @param  array        the array from which to get the value and error.
      * @param  index        index of the value in the given array.
@@ -779,9 +779,9 @@ public final class DoubleDouble extends Number {
      * Multiplies this {@code DoubleDouble} by another double-double value.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    multiply(other.value, other.error);
-     * }
+     * {@snippet lang="java" :
+     *   multiply(other.value, other.error);
+     *   }
      *
      * @param  other  the other value to multiply by this value.
      */
@@ -809,9 +809,9 @@ public final class DoubleDouble extends Number {
      * Multiplies this {@code DoubleDouble} by a {@code double} with a default error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    multiply(otherValue, errorForWellKnownValue(otherValue));
-     * }
+     * {@snippet lang="java" :
+     *   multiply(otherValue, errorForWellKnownValue(otherValue));
+     *   }
      *
      * <b>Tip:</b> if the other value is known to be an integer or a power of 2, then invoking
      * <code>{@linkplain #multiply(double) multiply}(otherValue)</code> is more efficient.
@@ -826,9 +826,9 @@ public final class DoubleDouble extends Number {
      * Multiplies this {@code DoubleDouble} by a {@code double} without error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    multiply(otherValue, 0);
-     * }
+     * {@snippet lang="java" :
+     *   multiply(otherValue, 0);
+     *   }
      *
      * @param  otherValue  the other value to multiply by this {@code DoubleDouble}.
      */
@@ -855,14 +855,14 @@ public final class DoubleDouble extends Number {
      * product has itself an error. The last term (the product of errors) is ignored because presumed very small.
      * In Java code:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   final double thisValue = this.value;
      *   final double thisError = this.error;
      *   setToProduct(thisValue, otherValue);
      *   error += otherError * thisValue;
      *   error += otherValue * thisError;
      *   setToQuickSum(value, error);
-     * }
+     *   }
      *
      * @param  otherValue  the other value by which to multiply this {@code DoubleDouble}.
      * @param  otherError  the error of the other value by which to multiply this {@code DoubleDouble}.
@@ -880,9 +880,9 @@ public final class DoubleDouble extends Number {
      * Multiplies this {@code DoubleDouble} by another double-double value stored in the given array.
      * This is a convenience method for a frequently used operation, implemented as below:
      *
-     * {@preformat java
-     *    multiply(array[index], array[index + errorOffset]);
-     * }
+     * {@snippet lang="java" :
+     *   multiply(array[index], array[index + errorOffset]);
+     *   }
      *
      * @param  array        the array from which to get the value and error.
      * @param  index        index of the value in the given array.
@@ -896,9 +896,9 @@ public final class DoubleDouble extends Number {
      * Divides this {@code DoubleDouble} by another double-double value.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    divide(other.value, other.error);
-     * }
+     * {@snippet lang="java" :
+     *   divide(other.value, other.error);
+     *   }
      *
      * @param  other  the other value to by which to divide this value.
      */
@@ -926,9 +926,9 @@ public final class DoubleDouble extends Number {
      * Divides this {@code DoubleDouble} by a {@code double} with a default error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    divide(otherValue, errorForWellKnownValue(otherValue));
-     * }
+     * {@snippet lang="java" :
+     *   divide(otherValue, errorForWellKnownValue(otherValue));
+     *   }
      *
      * <b>Tip:</b> if the other value is known to be an integer or a power of 2, then invoking
      * <code>{@linkplain #divide(double) divide}(otherValue)</code> is more efficient.
@@ -943,9 +943,9 @@ public final class DoubleDouble extends Number {
      * Divides this {@code DoubleDouble} by a {@code double} without error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    divide(otherValue, 0);
-     * }
+     * {@snippet lang="java" :
+     *   divide(otherValue, 0);
+     *   }
      *
      * @param  otherValue  the other value by which to divide this {@code DoubleDouble}.
      */
@@ -977,9 +977,9 @@ public final class DoubleDouble extends Number {
      * Divides this {@code DoubleDouble} by another double-double value stored in the given array.
      * This is a convenience method for a frequently used operation, implemented as below:
      *
-     * {@preformat java
-     *    divide(array[index], array[index + errorOffset]);
-     * }
+     * {@snippet lang="java" :
+     *   divide(array[index], array[index + errorOffset]);
+     *   }
      *
      * @param  array        the array from which to get the value and error.
      * @param  index        index of the value in the given array.
@@ -993,9 +993,9 @@ public final class DoubleDouble extends Number {
      * Divides the given double-double value by this {@code DoubleDouble}.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    inverseDivide(other.value, other.error);
-     * }
+     * {@snippet lang="java" :
+     *   inverseDivide(other.value, other.error);
+     *   }
      *
      * @param  other  the other value to divide by this value.
      */
@@ -1023,9 +1023,9 @@ public final class DoubleDouble extends Number {
      * Divides the given {@code double} value by this {@code DoubleDouble} with a default error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    inverseDivide(numeratorValue, errorForWellKnownValue(numeratorValue));
-     * }
+     * {@snippet lang="java" :
+     *   inverseDivide(numeratorValue, errorForWellKnownValue(numeratorValue));
+     *   }
      *
      * <b>Tip:</b> if the other value is known to be an integer or a power of 2, then invoking
      * <code>{@linkplain #inverseDivide(double) inverseDivide}(otherValue)</code> is more efficient.
@@ -1040,9 +1040,9 @@ public final class DoubleDouble extends Number {
      * Divides the given {@code double} value by this {@code DoubleDouble} without error term.
      * This is a convenience method for:
      *
-     * {@preformat java
-     *    inverseDivide(numeratorValue, 0);
-     * }
+     * {@snippet lang="java" :
+     *   inverseDivide(numeratorValue, 0);
+     *   }
      *
      * @param  numeratorValue  the other value to divide by this {@code DoubleDouble}.
      */
@@ -1083,7 +1083,7 @@ public final class DoubleDouble extends Number {
          */
         final double productError = error;
         setToSum(numeratorValue, -value);
-        error -= productError;  // Complete the above subtraction
+        error -= productError;                      // Complete the above subtraction
         error += numeratorError;
         /*
          * Adds the 'remainder / b' term, using 'remainder / b.value' as an approximation
@@ -1097,9 +1097,9 @@ public final class DoubleDouble extends Number {
      * Divides the given double-double value by this {@code DoubleDouble}.
      * This is a convenience method for a frequently used operation, implemented as below:
      *
-     * {@preformat java
-     *    inverseDivide(array[index], array[index + errorOffset]);
-     * }
+     * {@snippet lang="java" :
+     *   inverseDivide(array[index], array[index + errorOffset]);
+     *   }
      *
      * @param  array        the array from which to get the value and error.
      * @param  index        index of the value in the given array.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/FinalFieldSetter.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/FinalFieldSetter.java
index 8116bd10ee..3540a50610 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/FinalFieldSetter.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/FinalFieldSetter.java
@@ -28,7 +28,7 @@ import org.apache.sis.internal.system.Modules;
  * The usage pattern is:
  *
  * <p><b>On deserialization:</b></p>
- * {@preformat java
+ * {@snippet lang="java" :
  *     private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
  *         in.defaultReadObject();
  *         Object someValue = ...;
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
index 8886018831..ea83e16ea9 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
@@ -100,13 +100,13 @@ public final class Numerics extends Static {
      * detect the cases where two {@link org.apache.sis.referencing.operation.transform.LinearTransform}
      * are equal for practical purpose. This threshold can be used as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Matrix m1 = ...;
      *     Matrix m2 = ...;
      *     if (Matrices.epsilonEqual(m1, m2, COMPARISON_THRESHOLD, true)) {
      *         // Consider that matrixes are equal.
      *     }
-     * }
+     *     }
      *
      * By extension, the same threshold value is used for comparing other floating point values.
      *
@@ -123,9 +123,9 @@ public final class Numerics extends Static {
      * {@code double}. For any real value, the following code evaluate to 0 if the given value is
      * positive:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Double.doubleToRawLongBits(value) & SIGN_BIT_MASK;
-     * }
+     *     }
      *
      * Note that this idiom differentiates positive zero from negative zero.
      * It should be used only when such difference matter.
@@ -511,9 +511,9 @@ public final class Numerics extends Static {
      * Converts a power of 2 to a power of 10, rounded toward negative infinity.
      * This method is equivalent to the following code, but using only integer arithmetic:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return (int) Math.floor(exp2 * LOG10_2);
-     * }
+     *     }
      *
      * This method is valid only for arguments in the [-2620 … 2620] range, which is more than enough
      * for the range of {@code double} exponents. We do not put this method in public API because it
@@ -552,9 +552,9 @@ public final class Numerics extends Static {
      * where <var>n</var> is {@link Math#getExponent(double)} - {@value #SIGNIFICAND_SIZE}.
      * For any non-NaN values (including infinity), the following relationship holds:
      *
-     * {@preformat java
-     *    assert Math.scalb(getSignificand(value), Math.getExponent(value) - SIGNIFICAND_SIZE) == Math.abs(value);
-     * }
+     * {@snippet lang="java" :
+     *     assert Math.scalb(getSignificand(value), Math.getExponent(value) - SIGNIFICAND_SIZE) == Math.abs(value);
+     *     }
      *
      * For negative values, this method behaves as if the value was positive.
      *
@@ -582,9 +582,9 @@ public final class Numerics extends Static {
      * <var>n</var> is {@link Math#getExponent(float)} - {@value #SIGNIFICAND_SIZE_OF_FLOAT}.
      * For any non-NaN positive values (including infinity), the following relationship holds:
      *
-     * {@preformat java
-     *    assert Math.scalb(getSignificand(value), Math.getExponent(value) - SIGNIFICAND_SIZE_OF_FLOAT) == value;
-     * }
+     * {@snippet lang="java" :
+     *     assert Math.scalb(getSignificand(value), Math.getExponent(value) - SIGNIFICAND_SIZE_OF_FLOAT) == value;
+     *     }
      *
      * For negative values, this method behaves as if the value was positive.
      *
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Strings.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Strings.java
index a47e22ef63..a57fb071ce 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Strings.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Strings.java
@@ -88,11 +88,11 @@ public final class Strings extends Static {
      * (maybe the developer really wanted no-break spaces). To preserve no-break spaces, the
      * following can be used instead:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (text != null && !(text = text.trim()).isEmpty()) {
      *         // Use text here.
      *     }
-     * }
+     *     }
      *
      * @param  text  the text to trim, or {@code null}.
      * @return the trimmed text, or {@code null} if the given text was null or blank.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
index b3805b975e..0052d186af 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/UnmodifiableArrayList.java
@@ -29,15 +29,15 @@ import org.apache.sis.util.collection.CheckedContainer;
 /**
  * An unmodifiable view of an array. Invoking
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     List<?> list = UnmodifiableArrayList.wrap(array);
- * }
+ *     }
  *
  * is equivalent to
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     List<?> list = Collections.unmodifiableList(Arrays.asList(array));
- * }
+ *     }
  *
  * except that this class uses one less level of indirection (which may be significant since
  * unmodifiable lists are extensively used in SIS) and implements the {@link CheckedContainer}
diff --git a/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java b/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
index 5852bc3ca1..ddb7fc8459 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
@@ -43,7 +43,7 @@ import static org.apache.sis.util.Characters.isLineOrParagraphSeparator;
  *
  * <p>For example, the following code:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     TableAppender table = new TableAppender(System.out);
  *     table.nextLine('═');
  *     table.append("English\tFrench\tr.e.d.\n");
@@ -54,7 +54,7 @@ import static org.apache.sis.util.Characters.isLineOrParagraphSeparator;
  *          .append("Mars\tMars\t0.532\n");
  *     table.nextLine('═');
  *     table.flush();
- * }
+ *     }
  *
  * produces the following output:
  *
diff --git a/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java b/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java
index ef8fd2296a..46a4f3c957 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/io/TabularFormat.java
@@ -44,21 +44,21 @@ import org.apache.sis.util.resources.Errors;
  * Subclasses can use those fields like below:
  *
  * <p><b>Formatting table without border:</b></p>
- * {@preformat java
+ * {@snippet lang="java" :
  *     TableAppender table = new TableAppender(out, "");
  *     // ... do some work, then add a column separator:
  *     table.append(beforeFill);
  *     table.nextColumn(fillCharacter);
  *     table.append(columnSeparator);
- * }
+ *     }
  *
  * <p><b>Formatting table with a border:</b></p>
- * {@preformat java
+ * {@snippet lang="java" :
  *     TableAppender table = new TableAppender(out, columnSeparator);
  *     // ... do some work, then add a column separator:
  *     table.append(beforeFill);
  *     table.nextColumn(fillCharacter);
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.3
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java b/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java
index 9c2332aec2..cc02704c42 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/DecimalFunctions.java
@@ -132,9 +132,9 @@ public final class DecimalFunctions extends Static {
      * This method is equivalent to the following code, except that it is potentially faster since the
      * actual implementation avoid to format and parse the value:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   return Double.parseDouble(Float.toString(value));
-     * }
+     *   }
      *
      * @param  value  the {@code float} value to convert as a {@code double}.
      * @return the given value as a {@code double} with the extra decimal fraction digits set to zero.
@@ -186,17 +186,17 @@ public final class DecimalFunctions extends Static {
      * equivalent to the following code except that it is potentially faster since the actual implementation
      * avoids the creation of {@link java.math.BigDecimal} objects:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   BigDecimal base2  = new BigDecimal(value);     // Exact same value as stored in IEEE 754 format.
      *   BigDecimal base10 = BigDecimal.valueOf(value); // Exact same value as shown by println(value).
      *   return base10.subtract(base2).doubleValue();
-     * }
+     *   }
      *
      * Computing {@code value + deltaForDoubleToDecimal(value)} has no effect since the absolute value of the
      * returned delta is always smaller than <code>{@linkplain Math#ulp(double) Math.ulp}(value) / 2</code>.
      * To see an effect, a type with more precision than the {@code double} type is necessary.
      *
-     * <div class="note"><b>Use case:</b>
+     * <h4>Use case</h4>
      * Many international standards define values in base 10. For example, the conversion factor from inches
      * to centimetres is defined as exactly 2.54 cm/inch. This is by an internationally accepted definition
      * since 1959, not an approximation. But the 2.54 value cannot be represented exactly in the IEEE 754
@@ -205,7 +205,6 @@ public final class DecimalFunctions extends Static {
      * (e.g. in non-linear equations where errors can grow exponentially), this method can be useful.
      * Other examples of values defined in base 10 are conversions from feet to metres and
      * map projection parameters defined by national mapping agencies.
-     * </div>
      *
      * <h4>Domain of validity</h4>
      * The current implementation cannot compute delta for {@code abs(value) < 3E-8} approximately,
@@ -515,18 +514,17 @@ public final class DecimalFunctions extends Static {
      *   <tr><td>0.123</td>    <td>0.123456</td>    <td>false</td>  <td>{@code approximate} and {@code accurate} cannot be interchanged.</td></tr>
      * </table>
      *
-     * <div class="note"><b>Use case:</b>
+     * <h4>Use case</h4>
      * this method is useful when {@code approximate} is a number parsed by {@link Double#parseDouble(String)}
      * and the data producer may have rounded too many fraction digits when formatting the numbers.
      * In some cases we can suspect what the real value may be and want to ensure that a replacement
      * would not contradict the provided value. This happen for example in Well Known Text format,
      * where the following element is sometimes written with the conversion factor rounded:
      *
-     * {@preformat wkt
+     * {@snippet lang="wkt" :
      *   AngleUnit["degree", 0.017453292519943295]      // Expected
      *   AngleUnit["degree", 0.01745329252]             // Given by some providers
-     * }
-     * </div>
+     *   }
      *
      * @param  accurate     the most accurate number.
      * @param  approximate  the number which may have missing decimal fraction digits.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java b/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
index 09fe2d2dc9..dd526d0446 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
@@ -82,9 +82,9 @@ public final class MathFunctions extends Static {
      * The logarithm of 2 in base 10, which is approximated by {@value}.
      * This constant is useful for converting a power of 2 to a power of 10 as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   double exp10 = exp2 * LOG10_2;
-     * }
+     *   }
      *
      * @see Math#log10(double)
      * @see #getExponent(double)
@@ -509,9 +509,9 @@ public final class MathFunctions extends Static {
      * This method returns {@code false} for the negative zero ({@code -0.0}).
      * This method is equivalent to the following code, but potentially faster:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   return (value == 0) && isPositive(value);
-     * }
+     *   }
      *
      * @param  value  the value to test.
      * @return {@code true} if the given value is +0.0 (not -0.0).
@@ -554,9 +554,9 @@ public final class MathFunctions extends Static {
      * This method returns {@code false} for the positive zero ({@code +0.0}).
      * This method is equivalent to the following code, but potentially faster:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   return (value == 0) && isNegative(value);
-     * }
+     *   }
      *
      * @param  value  the value to test.
      * @return {@code true} if the given value is -0.0 (not +0.0).
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java b/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java
index 22624541e8..4c4a9ce4ca 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Statistics.java
@@ -65,18 +65,18 @@ import static java.lang.Double.doubleToLongBits;
  * The following examples assume that a <var>y</var>=<var>f</var>(<var>x</var>) function
  * is defined. A simple usage is:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Statistics stats = new Statistics("y");
  *     for (int i=0; i<numberOfValues; i++) {
  *         stats.accept(f(i));
  *     }
  *     System.out.println(stats);
- * }
+ *     }
  *
  * Following example computes the statistics on the first and second derivatives
  * in addition to the statistics on the sample values:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     final double x₀ = ...; // Put here the x value at i=0
  *     final double Δx = ...; // Put here the interval between x values
  *     Statistics stats = Statistics.forSeries("y", "∂y/∂x", "∂²y/∂x²");
@@ -85,7 +85,7 @@ import static java.lang.Double.doubleToLongBits;
  *     }
  *     stats.differences().scale(1/Δx);
  *     System.out.println(stats);
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (MPO, IRD, Geomatys)
  * @version 1.2
@@ -239,9 +239,9 @@ public class Statistics implements DoubleConsumer, LongConsumer, Cloneable, Seri
      * interval. In order to get the discrete derivatives, the following method needs to be invoked
      * <em>after</em> all sample values have been added:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     statistics.differences().scale(1/Δx);
-     * }
+     *     }
      *
      * The maximal "derivative" order is determined by the length of the {@code differenceNames} array:
      *
@@ -545,12 +545,12 @@ public class Statistics implements DoubleConsumer, LongConsumer, Cloneable, Seri
      * where Δ<var>x</var> is the constant interval between the <var>x</var> values of the
      * <var>y</var>=<var>f</var>(<var>x</var>) function:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Statistics derivative = statistics.differences();
      *     derivative.scale(1/Δx); // Shall be invoked only once.
      *     Statistics secondDerivative = derivative.differences();
      *     // Do not invoke scale(1/Δx) again.
-     * }
+     *     }
      *
      * This method returns a non-null value only if this {@code Statistics} instance has been created by a
      * call to the {@link #forSeries forSeries(…)} method with a non-empty {@code differenceNames} array.
@@ -680,9 +680,9 @@ public class Statistics implements DoubleConsumer, LongConsumer, Cloneable, Seri
          * {@link #delta} statistics. This constructor allows chaining different kind of
          * statistics objects. For example, one could write:
          *
-         * {@preformat java
+         * {@snippet lang="java" :
          *     new Statistics.Delta(new Statistics.Delta());
-         * }
+         *     }
          *
          * which would compute statistics of sample values, statistics of difference between
          * consecutive sample values, and statistics of difference of difference between
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java b/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
index ef37c021f1..71ff8d91f9 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
@@ -54,11 +54,11 @@ import static org.apache.sis.util.ArgumentChecks.ensureValidIndex;
  * Vectors can be a view over a subsection of the given array, or can provide a view of the elements in reverse order,
  * <i>etc</i>. The example below creates a view over a subsection:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     float[] array = new float[100];
  *     Vector v = Vector.create(array, false).subList(20, 40)
  *     // At this point, v.doubleValue(0) is equivalent to (double) array[20].
- * }
+ *     }
  *
  * <h2>Usage</h2>
  * The methods that are most often used after {@code Vector} creation are {@link #size()} and {@link #doubleValue(int)}
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java b/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java
index b623ade23b..3ed2b7a2ed 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java
@@ -338,9 +338,9 @@ abstract class AbstractUnit<Q extends Quantity<Q>> implements Unit<Q>, LenientCo
      * Indicates if this unit is compatible with the given unit.
      * This implementation delegates to:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   return getDimension().equals(that.getDimension());
-     * }
+     *   }
      *
      * @param  that the other unit to compare for compatibility.
      * @return {@code true} if the given unit is compatible with this unit.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java b/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
index 2055557906..1e26f4622e 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
@@ -1292,7 +1292,7 @@ public class AngleFormat extends Format implements Localized {
      * Formats an angle, latitude or longitude value as an attributed character iterator.
      * Callers can iterate and queries the attribute values as in the following example:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     AttributedCharacterIterator it = angleFormat.formatToCharacterIterator(myAngle);
      *     for (char c=it.first(); c!=AttributedCharacterIterator.DONE; c=c.next()) {
      *         // 'c' is a character from the formatted string.
@@ -1301,7 +1301,7 @@ public class AngleFormat extends Format implements Localized {
      *             // This field extends from it.getRunStart(MINUTES) to it.getRunLimit(MINUTES).
      *         }
      *     }
-     * }
+     *     }
      *
      * Alternatively, if the current {@linkplain AttributedCharacterIterator#getIndex() iterator
      * index} is before the start of the minutes field, then the starting position of that field
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/DerivedScalar.java b/core/sis-utility/src/main/java/org/apache/sis/measure/DerivedScalar.java
index 28cfc438b0..2e9768cb2b 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/DerivedScalar.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/DerivedScalar.java
@@ -99,10 +99,10 @@ class DerivedScalar<Q extends Quantity<Q>> extends Scalar<Q> {
      * The unit of measurement shall be the same than the system unit of this quantity.
      * Implementation in subclasses should be like below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assert newUnit == getSystemUnit() : newUnit;
      *     return new MyDerivedScalar(this, newValue);
-     * }
+     *     }
      */
     @Override
     Quantity<Q> create(double newValue, Unit<Q> newUnit) {
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/IdentityConverter.java b/core/sis-utility/src/main/java/org/apache/sis/measure/IdentityConverter.java
index 0170433aef..ed35f93ea8 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/IdentityConverter.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/IdentityConverter.java
@@ -27,9 +27,7 @@ import org.apache.sis.util.LenientComparable;
  * instead of using the more generic {@link LinearConverter} class because we want to avoid performing
  * any arithmetic operation in the {@link #convert(double)} method, in order to preserve negative zero:
  *
- * {@preformat java
- *     convert(-0d) ≡ -0d
- * }
+ * <pre class="math">convert(-0d) ≡ -0d</pre>
  *
  * When the value is used in a map projection parameter, its sign can have implications in the chain of
  * concatenated transforms. The final result is numerically equivalent, but intermediate steps may differ
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java b/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
index 5a96e06aaa..098c45b675 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
@@ -682,7 +682,7 @@ public class RangeFormat extends Format implements Localized {
      * Formats a range as an attributed character iterator.
      * Callers can iterate and queries the attribute values as in the following example:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     AttributedCharacterIterator it = rangeFormat.formatToCharacterIterator(myRange);
      *     for (char c=it.first(); c!=AttributedCharacterIterator.DONE; c=c.next()) {
      *         // 'c' is a character from the formatted string.
@@ -691,7 +691,7 @@ public class RangeFormat extends Format implements Localized {
      *             // This field extends from it.getRunStart(MIN_VALUE) to it.getRunLimit(MIN_VALUE).
      *         }
      *     }
-     * }
+     *     }
      *
      * Alternatively, if the current {@linkplain AttributedCharacterIterator#getIndex() iterator
      * index} is before the start of the minimum value field, then the starting position of that
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java b/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
index 7d0dd9d534..175c21fbc3 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
@@ -403,9 +403,9 @@ final class SystemUnit<Q extends Quantity<Q>> extends AbstractUnit<Q> implements
      *
      * <p>The most important alternate unit in Apache SIS is {@link Units#RADIAN}, defined as below:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   Unit<Angle> RADIAN = ONE.alternate("rad").asType(Angle.class);
-     * }
+     *   }
      *
      * @param  symbol  the new symbol for the alternate unit.
      * @return the alternate unit.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java b/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java
index 7c36ce3087..6baf609684 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/ValueRange.java
@@ -28,8 +28,8 @@ import java.lang.annotation.RetentionPolicy;
  * When used with JavaBeans, this annotation shall be applied on the getter method
  * as in the following example:
  *
- * {@preformat java
- *     &#64;ValueRange(minimum=0, maximum=100)
+ * {@snippet lang="java" :
+ *     @ValueRange(minimum=0, maximum=100)
  *     public double getCloudCoverPercentage() {
  *         // Method implementation here...
  *     }
@@ -42,8 +42,8 @@ import java.lang.annotation.RetentionPolicy;
  * zero makes no sense. Note also that the {@code maximum} value is not explicitly
  * provided, in which case it defaults to infinity.
  *
- * {@preformat java
- *     &#64;@ValueRange(minimum=0, isMinIncluded=false)
+ * {@snippet lang="java" :
+ *     @ValueRange(minimum=0, isMinIncluded=false)
  *     public double getSpatialResolution() {
  *         // Method implementation here...
  *     }
@@ -54,14 +54,14 @@ import java.lang.annotation.RetentionPolicy;
  * uses a convenience constructor for this purpose. Note that the {@code Double} type could
  * by inferred from {@link java.lang.reflect.Method#getReturnType()}.
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Method myMethod = ...;
  *     ValueRange annotation = myMethod.getAnnotation(ValueRange.class);
  *     if (annotation != null) {
  *         NumberRange<Double> range = new NumberRange(Double.class, annotation);
  *         // Use the range here.
  *     }
- * }
+ *     }
  *
  * The {@link org.apache.sis.metadata.AbstractMetadata} class uses this annotation for inferring
  * {@link org.opengis.parameter.ParameterDescriptor} from metadata interfaces and implementation
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/measure/package-info.java
index 662ee16193..18849c00dc 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/package-info.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/package-info.java
@@ -67,22 +67,22 @@
  * those arithmetic operations are automatically inferred.
  * For example, this line of code:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *   System.out.println( Units.PASCAL.multiply(1000) );
- * }
+ *   }
  *
  * prints <cite>"kPa"</cite>, i.e. the kilo prefix has been automatically applied
  * (SI prefixes are applied on SI units only, not on other systems).
  * Other example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *   Force  f = Quantities.create(4, Units.NEWTON);
  *   Length d = Quantities.create(6, Units.MILLIMETRE);
  *   Time   t = Quantities.create(3, Units.SECOND);
  *   Quantity<?> e = f.multiply(d).divide(t);
  *   System.out.println(e);
  *   System.out.println("Instance of Power: " + (e instanceof Power));
- * }
+ *   }
  *
  * prints <cite>"8 mW"</cite> and <cite>"Instance of Power: true"</cite>,
  * i.e. Apache SIS detects that the result of N⋅m∕s is Watt,
diff --git a/core/sis-utility/src/main/java/org/apache/sis/setup/About.java b/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
index 021675162d..d25f8d4112 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
@@ -171,9 +171,9 @@ public enum About {
      *
      * <p>This convenience method is equivalent to the following code:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return configuration(EnumSet.allOf(About.class), null, null);
-     * }
+     *     }
      *
      * @return configuration information, as a tree for grouping some configuration by sections.
      */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/setup/Configuration.java b/core/sis-utility/src/main/java/org/apache/sis/setup/Configuration.java
index 83bbe41c6b..b33151258c 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/setup/Configuration.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/setup/Configuration.java
@@ -102,7 +102,7 @@ public final class Configuration {
      * Data source specified by JNDI has precedence over data source specified by this method in order to let users
      * control their data source. The following example shows how to setup a connection to a PostgreSQL database:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     import org.postgresql.ds.PGSimpleDataSource;
      *
      *     class MyClass {
@@ -124,7 +124,7 @@ public final class Configuration {
      *             Configuration.current().setDatabase(MyClass::createDataSource);
      *         }
      *     }
-     * }
+     *     }
      *
      * This method can be invoked only before the first attempt to {@linkplain #getDatabase() get the database}.
      * If the {@link DataSource} has already be obtained, then this method throws {@link IllegalStateException}.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java b/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
index 6554d6bd86..dcfe462ef0 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
@@ -52,7 +52,7 @@ import static java.util.logging.Logger.getLogger;
  * Developers who wish to define their own options can define static constants in a subclass,
  * as in the following example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public final class MyOptionKey<T> extends OptionKey<T> {
  *         public static final OptionKey<String> MY_OPTION = new MyOptionKey<>("MY_OPTION", String.class);
  *
@@ -60,7 +60,7 @@ import static java.util.logging.Logger.getLogger;
  *             super(name, type);
  *         }
  *     }
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
@@ -260,12 +260,12 @@ public class OptionKey<T> implements Serializable {
      * Returns the option value in the given map for this key, or {@code null} if none.
      * This is a convenience method for implementers, which can be used as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     public <T> T getOption(final OptionKey<T> key) {
      *         ArgumentChecks.ensureNonNull("key", key);
      *         return key.getValueFrom(options);
      *     }
-     * }
+     *     }
      *
      * @param  options  the map where to search for the value, or {@code null} if not yet created.
      * @return the current value in the map for the this option, or {@code null} if none.
@@ -278,12 +278,12 @@ public class OptionKey<T> implements Serializable {
      * Sets a value for this option key in the given map, or in a new map if the given map is {@code null}.
      * This is a convenience method for implementers, which can be used as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     public <T> void setOption(final OptionKey<T> key, final T value) {
      *         ArgumentChecks.ensureNonNull("key", key);
      *         options = key.setValueInto(options, value);
      *     }
-     * }
+     *     }
      *
      * @param  options  the map where to set the value, or {@code null} if not yet created.
      * @param  value    the new value for the given option, or {@code null} for removing the value.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java b/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java
index a508c9caee..a300eceb4e 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java
@@ -1198,10 +1198,10 @@ public final class ArraysExt extends Static {
      * <p>Callers can obtain an array of appropriate length using the following idiom.
      * Note that this idiom will create a new array only if necessary:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     T[] array = ...;
      *     array = resize(array, removeDuplicated(array));
-     * }
+     *     }
      *
      * <div class="note"><b>API note:</b>
      * This method return type is not an array in order to make obvious that the given array will be modified in-place.
@@ -1886,13 +1886,13 @@ public final class ArraysExt extends Static {
      * but only if all casts are lossless. If any cast causes data loss, then this method returns {@code null}.
      * This method is equivalent to the following code, but potentially more efficient:
      *
-     * {@preformat java
-     *    if (isSinglePrecision(data)) {
-     *        return copyAsFloat(data);
-     *    } else {
-     *        return null;
-     *    }
-     * }
+     * {@snippet lang="java" :
+     *     if (isSinglePrecision(data)) {
+     *         return copyAsFloat(data);
+     *     } else {
+     *         return null;
+     *     }
+     *     }
      *
      * @param  data  the array to copy, or {@code null}.
      * @return a copy of the given array with values casted to the {@code float} type, or
@@ -2239,10 +2239,10 @@ public final class ArraysExt extends Static {
      * Callers are encouraged to place the following assertions before calls to this method,
      * using the {@link #isSorted(int[], boolean)} and {@link Arrays#toString(int[])} methods:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   assert isSorted(array1, true) : toString(array1);
      *   assert isSorted(array2, true) : toString(array2);
-     * }
+     *   }
      *
      * @param  array1  the first array, or {@code null}.
      * @param  array2  the second array, or {@code null}.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java b/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
index 43678075cd..6c81efd067 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
@@ -287,9 +287,9 @@ public final class CharSequences extends Static {
      * except that this method works on arbitrary {@link CharSequence} objects instead of
      * {@link String}s only, and that the upper limit can be specified:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return text.indexOf(part, fromIndex);
-     * }
+     *     }
      *
      * There is no restriction on the value of {@code fromIndex}. If negative or greater
      * than {@code toIndex}, then the behavior of this method is as if the search started
@@ -1002,9 +1002,9 @@ search:     for (; fromIndex <= toIndex; fromIndex++) {
      * except that the {@link CharSequence#subSequence(int, int) subSequence} method is
      * invoked only once instead of two times:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     text = trimWhitespaces(text.subSequence(lower, upper));
-     * }
+     *     }
      *
      * @param  text   the text from which to remove leading and trailing white spaces.
      * @param  lower  index of the first character to consider for inclusion in the sub-sequence.
@@ -1620,9 +1620,9 @@ cmp:    while (ia < lga) {
      * In particular, spaces and punctuation characters like {@code '_'} and {@code '-'} are
      * ignored:</p>
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assert equalsFiltered("WGS84", "WGS_84", Characters.Filter.LETTERS_AND_DIGITS, true) == true;
-     * }
+     *     }
      *
      * @param  s1          the first characters sequence to compare, or {@code null}.
      * @param  s2          the second characters sequence to compare, or {@code null}.
@@ -1767,9 +1767,9 @@ cmp:    while (ia < lga) {
      * except that this method works on arbitrary {@link CharSequence} objects instead of
      * {@link String}s only:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return text.regionMatches(offset, part, 0, part.length());
-     * }
+     *     }
      *
      * This method does not thrown {@code IndexOutOfBoundsException}. Instead, if
      * {@code fromIndex < 0} or {@code fromIndex + part.length() > text.length()},
@@ -1807,9 +1807,9 @@ cmp:    while (ia < lga) {
      * except that this method works on arbitrary {@link CharSequence} objects instead of
      * {@link String}s only:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return text.regionMatches(ignoreCase, offset, part, 0, part.length());
-     * }
+     *     }
      *
      * This method does not thrown {@code IndexOutOfBoundsException}. Instead, if
      * {@code fromIndex < 0} or {@code fromIndex + part.length() > text.length()},
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java b/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java
index e41f8bec63..867ad48983 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java
@@ -325,10 +325,10 @@ public final class Classes extends Static {
      * This method is also useful for fetching the class of an object known only by its bound
      * type. As of Java 6, the usual pattern:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Number n = 0;
      *     Class<? extends Number> c = n.getClass();
-     * }
+     *     }
      *
      * doesn't seem to work if {@link Number} is replaced by a parameterized type {@code T}.
      *
@@ -666,17 +666,16 @@ next:       for (final Class<?> candidate : candidates) {
      * Only interfaces assignable to {@code baseInterface} are compared.
      * Declaration order does not matter.
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * in ISO 19111, different interfaces exist for different coordinate system (CS) geometries
      * ({@code CartesianCS}, {@code PolarCS}, etc.). One can check if two implementations have
      * the same geometry with the following code:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (implementSameInterfaces(cs1, cs2, CoordinateSystem.class)) {
      *         // The two Coordinate Systems are of the same kind.
      *     }
-     * }
-     * </div>
+     *     }
      *
      * @param  object1  the first object to check for interfaces.
      * @param  object2  the second object to check for interfaces.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/ComparisonMode.java b/core/sis-utility/src/main/java/org/apache/sis/util/ComparisonMode.java
index 80b90f2cc6..0c89dd0f85 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/ComparisonMode.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/ComparisonMode.java
@@ -162,9 +162,9 @@ public enum ComparisonMode {
      * objects are not equal and assertions are enabled. The exception message and stack trace help
      * to locate which attributes are not equal. This mode is typically used in assertions like below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assert Utilities.deepEquals(object1, object2, ComparisonMode.DEBUG);
-     * }
+     *     }
      *
      * Note that a comparison in {@code DEBUG} mode may still return {@code false} without
      * throwing an exception, since not all corner cases are tested. The exception is only
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java b/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java
index 14f1cf6a29..68fdf67c01 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java
@@ -150,11 +150,11 @@ public interface LenientComparable {
      * Returns {@code true} if this object is strictly equals to the given object.
      * This method is usually implemented as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     public boolean equals(Object other) {
      *         return equals(other, ComparisonMode.STRICT);
      *     }
-     * }
+     *     }
      *
      * Implementers shall ensure that the following conditions hold. Unless the {@code equals}
      * behavior is clearly documented in the interface javadoc (as for example in the Java
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java b/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
index 2a1187fc21..772235c652 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
@@ -41,10 +41,10 @@ import static org.apache.sis.util.collection.Containers.hashMapCapacity;
  * invoked on the {@link #ALL} or {@link #SIS} instance in order to specify the scope.
  * Examples:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Locales[] lc1 = Locales.ALL.getAvailableLanguages();  // All languages installed on the JavaVM.
  *     Locales[] lc2 = Locales.SIS.getAvailableLanguages();  // Only the languages known to Apache SIS.
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Cullen Rombach (Image Matters)
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java b/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
index 228149b097..fd69c86fad 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
@@ -300,13 +300,12 @@ public final class Numbers extends Static {
      * <p>If one of the given argument is null, then this method returns the non-null argument.
      * If both arguments are null, then this method returns {@code null}.</p>
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * in the following code, {@code type} is set to {@code Long.class}:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Class<?> type = widestClass(Short.class, Long.class);
-     * }
-     * </div>
+     *     }
      *
      * @param  c1  the first number type, or {@code null}.
      * @param  c2  the second number type, or {@code null}.
@@ -361,13 +360,12 @@ public final class Numbers extends Static {
      * <p>If one of the given argument is null, then this method returns the non-null argument.
      * If both arguments are null, then this method returns {@code null}.</p>
      *
-     * <div class="note"><b>Example:</b>
+     * <h4>Example</h4>
      * in the following code, {@code type} is set to {@code Short.class}:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Class<?> type = widestClass(Short.class, Long.class);
-     * }
-     * </div>
+     *     }
      *
      * @param  c1  the first number type, or {@code null}.
      * @param  c2  the second number type, or {@code null}.
@@ -446,9 +444,9 @@ public final class Numbers extends Static {
      * Returns the given number wrapped in the smallest class capable to hold the specified value.
      * This method is equivalent to the following code, in a slightly more efficient way:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return cast(value, narrowestClass(value));
-     * }
+     *     }
      *
      * @param  value  the value to be wrapped in a finer (if possible) {@link Number}.
      * @return the narrowest type capable to hold the given value.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java b/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java
index 6fa36f72c7..2a637ec0be 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java
@@ -154,11 +154,11 @@ public interface ObjectConverter<S,T> extends Function<S,T> {
      * Returns a converter capable to convert instances of <var>T</var> back to instances of <var>S</var>.
      * Before to invoke this method, callers can verify if this converter is invertible as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (converter.properties().contains(FunctionProperty.INVERTIBLE)) {
      *         // Call to converter.inverse() is allowed here.
      *     }
-     * }
+     *     }
      *
      * @return a converter for converting instances of <var>T</var> back to instances of <var>S</var>.
      * @throws UnsupportedOperationException if this converter is not invertible.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java b/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java
index 06a898eaf9..de4506eb60 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverters.java
@@ -41,12 +41,12 @@ import org.apache.sis.internal.converter.SystemRegistry;
  *   <li>{@link #derivedValues(Map, Class, ObjectConverter)}</li>
  * </ul>
  *
- * <div class="note"><b>Example:</b>
+ * <h2>Example</h2>
  * the following code converts instances in a collection from type {@code S} to type {@code T},
  * where the types are unknown at compile-time. Note that the converter is obtained only once
  * before to be applied to every elements in the loop.
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     Class<S> sourceType = ...
  *     Class<T> targetType = ...
  *     Collection<S> sources = ...;
@@ -55,8 +55,7 @@ import org.apache.sis.internal.converter.SystemRegistry;
  *     for (S source : sources) {
  *         targets.add(converter.apply(source));
  *     }
- * }
- * </div>
+ *     }
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 0.3
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/ResourceInternationalString.java b/core/sis-utility/src/main/java/org/apache/sis/util/ResourceInternationalString.java
index dd664adc7e..1e5fb6899b 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/ResourceInternationalString.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/ResourceInternationalString.java
@@ -34,25 +34,22 @@ import java.util.MissingResourceException;
  * See the {@link ResourceBundle#getBundle(String, Locale, ClassLoader) ResourceBundle.getBundle(…)}
  * Javadoc for more information.
  *
- * <div class="note"><b>Example:</b>
+ * <h2>Example</h2>
  * if a file named "{@code MyResources.properties}" exists in {@code org.mypackage}
  * and contains the following line:
  *
- * {@preformat text
- *     MyKey = some value
- * }
+ * <pre class="text">MyKey = some value</pre>
  *
  * Then an international string for {@code "some value"} can be created using the following code:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     InternationalString value = new ResourceInternationalString("org.mypackage.MyResources", "MyKey");
- * }
+ *     }
  *
  * The {@code "some value"} string will be localized if the required properties files exist, for
  * example "{@code MyResources_fr.properties}" for French or "{@code MyResources_it.properties}"
  * for Italian, <i>etc</i>.
  * If needed, users can gain more control by overriding the {@link #getBundle(Locale)} method.
- * </div>
  *
  * <h2>Class loaders</h2>
  * Developers can specify explicitly the {@link ClassLoader} to use be overriding the
@@ -128,8 +125,8 @@ public class ResourceInternationalString extends AbstractInternationalString imp
      * For example, the code below works well if {@code MyResource} is a class defined
      * in the same module than the one that contain the resources to load:
      *
-     * {@preformat java
-     *     &#64;Override
+     * {@snippet lang="java" :
+     *     @Override
      *     protected ResourceBundle getBundle(final Locale locale) {
      *         return ResourceBundle.getBundle(resources, locale, MyResource.class.getClassLoader());
      *     }
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java b/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
index bf58b3a137..2cae0d81ca 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
@@ -63,9 +63,9 @@ public final class Utilities extends Static {
      * <h4>Implementation note</h4>
      * This is a convenience method for the following method call:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return deepEquals(object1, object2, ComparisonMode.IGNORE_METADATA);
-     * }
+     *     }
      *
      * @param  object1  the first object to compare (may be null).
      * @param  object2  the second object to compare (may be null).
@@ -97,9 +97,9 @@ public final class Utilities extends Static {
      * <h4>Implementation note</h4>
      * This is a convenience method for the following method call:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return deepEquals(object1, object2, ComparisonMode.APPROXIMATE);
-     * }
+     *     }
      *
      * @param  object1  the first object to compare (may be null).
      * @param  object2  the second object to compare (may be null).
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java
index 41747868f1..24056800aa 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java
@@ -31,7 +31,7 @@ import org.apache.sis.util.Exceptions;
  * for re-throwing the cause as in the example below. This allows client code to behave as if a
  * {@link java.util.Collection} interface was allowed to declare checked exceptions.</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     void myMethod() throws IOException {
  *         Collection c = ...;
  *         try {
@@ -105,7 +105,7 @@ public class BackingStoreException extends RuntimeException {
      *
      * This method should be used as in the example below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     void myMethod() throws IOException {
      *         Collection c = ...;
      *         try {
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
index 072539a513..60dbc08214 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
@@ -54,13 +54,15 @@ import org.apache.sis.internal.system.ReferenceQueueConsumer;
  * The easiest way to use this class is to invoke {@link #computeIfAbsent computeIfAbsent(…)}
  * or {@link #getOrCreate getOrCreate(…)} with lambda functions as below:
  *
- * {@preformat java
- *     private final Cache<String,MyObject> cache = new Cache<String,MyObject>();
+ * {@snippet lang="java" :
+ *     class MyClass {
+ *         private final Cache<String,MyObject> cache = new Cache<String,MyObject>();
  *
- *     public MyObject getMyObject(String key) {
- *         return cache.computeIfAbsent(key, (k) -> createMyObject(k));
+ *         public MyObject getMyObject(String key) {
+ *             return cache.computeIfAbsent(key, (k) -> createMyObject(k));
+ *         }
+ *     }
  *     }
- * }
  *
  * Alternatively, one can handle explicitly the locks.
  * This alternative sometimes provides more flexibility, for example in exception handling.
@@ -80,7 +82,7 @@ import org.apache.sis.internal.system.ReferenceQueueConsumer;
  * be inside the {@code finally} block of a {@code try} block beginning immediately after the call
  * to {@link #lock lock(…)}, no matter what the result of the computation is (including {@code null}).
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     private final Cache<String,MyObject> cache = new Cache<String,MyObject>();
  *
  *     public MyObject getMyObject(final String key) throws MyCheckedException {
@@ -277,11 +279,15 @@ public class Cache<K,V> extends AbstractMap<K,V> implements ConcurrentMap<K,V> {
      * If a value already exists in the cache, then it is returned immediately.
      * Otherwise the {@code creator.call()} method is invoked and its result is saved in this cache for future reuse.
      *
-     * <div class="note"><b>Example:</b>
+     * <p>This method is similar to {@link #computeIfAbsent(Object, Function)} except that it can propagate checked exceptions.
+     * If the {@code creator} function does not throw any checked exception,
+     * then invoking {@code computeIfAbsent(…)} is simpler.</p>
+     *
+     * <h4>Example</h4>
      * the following example shows how this method can be used.
      * In particular, it shows how to propagate {@code MyCheckedException}:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     private final Cache<String,MyObject> cache = new Cache<String,MyObject>();
      *
      *     public MyObject getMyObject(final String key) throws MyCheckedException {
@@ -298,11 +304,6 @@ public class Cache<K,V> extends AbstractMap<K,V> implements ConcurrentMap<K,V> {
      *         }
      *     }
      * }
-     * </div>
-     *
-     * This method is similar to {@link #computeIfAbsent(Object, Function)} except that it can propagate
-     * checked exceptions. If the {@code creator} function does not throw any checked exception, then
-     * invoking {@code computeIfAbsent(…)} is simpler.
      *
      * @param  key      the key for which to get the cached or created value.
      * @param  creator  a method for creating a value, to be invoked only if no value are cached for the given key.
@@ -335,20 +336,19 @@ public class Cache<K,V> extends AbstractMap<K,V> implements ConcurrentMap<K,V> {
      * Otherwise the {@code creator.apply(Object)} method is invoked and its result
      * is saved in this cache for future reuse.
      *
-     * <div class="note"><b>Example:</b>
+     * <p>This method is similar to {@link #getOrCreate(Object, Callable)}, but without checked exceptions.</p>
+     *
+     * <h4>Example</h4>
      * below is the same code than {@link #getOrCreate(Object, Callable)} example,
      * but without the need for any checked exception handling:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     private final Cache<String,MyObject> cache = new Cache<String,MyObject>();
      *
      *     public MyObject getMyObject(final String key) {
      *         return cache.computeIfAbsent(key, (k) -> createMyObject(k));
      *     }
      * }
-     * </div>
-     *
-     * This method is similar to {@link #getOrCreate(Object, Callable)}, but without checked exceptions.
      *
      * @param  key      the key for which to get the cached or created value.
      * @param  creator  a method for creating a value, to be invoked only if no value are cached for the given key.
@@ -854,14 +854,14 @@ public class Cache<K,V> extends AbstractMap<K,V> implements ConcurrentMap<K,V> {
      * with a {@link Handler#putAndUnlock(Object) putAndUnlock} call in {@code try} … {@code catch}
      * blocks as in the example below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Cache.Handler handler = cache.lock();
      *     try {
      *         // Compute the result...
      *     } finally {
      *         handler.putAndUnlock(result);
      *     }
-     * }
+     *     }
      *
      * @param  key  the key for the entry to lock.
      * @return a handler to use for unlocking and storing the result.
@@ -972,7 +972,7 @@ public class Cache<K,V> extends AbstractMap<K,V> implements ConcurrentMap<K,V> {
      * The handler returned by {@link Cache#lock}, to be used for unlocking and storing the result.
      * This handler should be used as below (the {@code try} … {@code finally} statements are important):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     Value V = null;
      *     Cache.Handler<V> handler = cache.lock(key);
      *     try {
@@ -983,7 +983,7 @@ public class Cache<K,V> extends AbstractMap<K,V> implements ConcurrentMap<K,V> {
      *     } finally {
      *         handler.putAndUnlock(value);
      *     }
-     * }
+     *     }
      *
      * See the {@link Cache} javadoc for a more complete example.
      *
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java
index 8459383a94..08f6efc4fb 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java
@@ -27,9 +27,9 @@ import java.util.Collection;
  * If a class implements both {@code CheckedContainer} and {@code Collection},
  * then the parameterized type shall be the same type. Example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     class MyList<E> extends AbstractList<E> implements CheckedContainer<E> { ... }
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 0.3
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java
index 544d3a0ce8..edfe2039c3 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/CodeListSet.java
@@ -45,10 +45,10 @@ import org.apache.sis.internal.util.CheckedArrayList;
  * The following example creates a set of {@link org.opengis.referencing.cs.AxisDirection}s
  * for a (<var>x</var>,<var>y</var>,<var>z</var>) coordinate system:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *   CodeListSet<AxisDirection> codes = new CodeListSet<>(AxisDirection.class);
  *   Collections.addAll(codes, AxisDirection.EAST, AxisDirection.NORTH, AxisDirection.UP),
- * }
+ *   }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.4
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
index d926ec6a3f..17db3316ac 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
@@ -40,7 +40,7 @@ import static org.apache.sis.util.collection.Containers.hashMapCapacity;
  *
  * Example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public class CityLocation {
  *         public static final TableColumn<String> CITY_NAME  = new TableColumn<>(String.class, "City name");
  *         public static final TableColumn<Float>  LATITUDE   = new TableColumn<>(Float.class,  "Latitude");
@@ -55,7 +55,7 @@ import static org.apache.sis.util.collection.Containers.hashMapCapacity;
  *             return table;
  *         }
  *     }
- * }
+ *     }
  *
  * The {@code setRoot(…)} method accepts arbitrary {@link TreeTable.Node} implementations.
  * However, it is likely to be safer and more memory efficient when used together with the
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedSet.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedSet.java
index f7ac505d37..81b9e2b9f1 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedSet.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/DerivedSet.java
@@ -142,9 +142,9 @@ class DerivedSet<S,E> extends SetOfUnknownSize<E> implements CheckedContainer<E>
      * This method first checks if the given element is non-null,
      * then delegates to the {@link #storage} set like below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     return storage.add(inverse.apply(element));
-     * }
+     *     }
      *
      * @param  element element whose presence in this set is to be ensured.
      * @return {@code true} if the set changed as a result of the call.
@@ -213,9 +213,9 @@ class DerivedSet<S,E> extends SetOfUnknownSize<E> implements CheckedContainer<E>
          * This method first checks if the given element is an instance of {@link #getElementType()},
          * then delegates to the {@link #storage} set like below:
          *
-         * {@preformat java
+         * {@snippet lang="java" :
          *     return storage.contains(inverse.apply(element));
-         * }
+         *     }
          *
          * @param  element  object to be checked for containment in this set.
          * @return {@code true} if this set contains the specified element.
@@ -231,9 +231,9 @@ class DerivedSet<S,E> extends SetOfUnknownSize<E> implements CheckedContainer<E>
          * This method first checks if the given element is an instance of {@link #getElementType},
          * then delegates to the {@link #storage} set like below:
          *
-         * {@preformat java
+         * {@snippet lang="java" :
          *     return storage.remove(inverse.apply(element));
-         * }
+         *     }
          *
          * @param  element  element to be removed from this set, if present.
          * @return {@code true} if the set contained the specified element.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
index b1e07b8de9..cb1fac3036 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
@@ -919,11 +919,11 @@ public class RangeSet<E extends Comparable<? super E>> extends AbstractSet<Range
      * The default implementation is equivalent to the following pseudo-code
      * (omitting argument checks):
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   return intersect(new Range<E>(elementType,
      *           lower.minValue,  lower.isMinIncluded,
      *           upper.minValue, !upper.isMinIncluded));
-     * }
+     *   }
      *
      * <div class="note"><b>API note:</b>
      * This method takes the minimal value of the {@code upper} argument instead
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java
index e72d46b5f4..d8d4f4bdf2 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TableColumn.java
@@ -32,7 +32,7 @@ import org.apache.sis.util.SimpleInternationalString;
  * for a particular column. {@code TableColumn}s are used for fetching values from nodes
  * as in the following example:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public class CityLocation {
  *         public static final ColumnTable<String> CITY_NAME = new ColumnTable<>(String.class, "City name");
  *         public static final ColumnTable<Float>  LATITUDE  = new ColumnTable<>(Float.class,  "Latitude");
@@ -48,7 +48,7 @@ import org.apache.sis.util.SimpleInternationalString;
  *             longitude = myNode.getValue(LONGITUDE);
  *         }
  *     }
- * }
+ *     }
  *
  * <h2>Identity comparisons and serialization</h2>
  * This base class relies on <cite>identity comparisons</cite> instead of defining the
@@ -63,7 +63,7 @@ import org.apache.sis.util.SimpleInternationalString;
  * Developers who need serialization support for their own instances have to resolve them in
  * their own subclass. The following example is one possible way to achieve that goal:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     public class CityLocation {
  *         public static final ColumnTable<String> CITY_NAME = new Column<>("CITY_NAME", String.class, "City name");
  *         public static final ColumnTable<Float>  LATITUDE  = new Column<>("LATITUDE",  Float.class,  "Latitude");
@@ -86,7 +86,7 @@ import org.apache.sis.util.SimpleInternationalString;
  *             }
  *         }
  *     }
- * }
+ *     }
  *
  * The constants defined in this class use a similar approach for providing serialization support.
  *
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
index 0c47f5cbcc..ba38ea6f5b 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
@@ -49,12 +49,12 @@ import java.util.List;
  * {@code TreeTable} instance. Using directly those static constants provides type
  * safety, as in the following example:</p>
  *
- * {@preformat java
- *     TreeTable table = ...; // Put here a TreeTable instance.
+ * {@snippet lang="java" :
+ *     TreeTable table = ...;                   // Put here a TreeTable instance.
  *     TreeTable.Node node = table.getRoot();
  *     CharSequence   name = node.getValue(TableColumn.NAME);
  *     Class<?>       type = node.getValue(TableColumn.TYPE);
- * }
+ *     }
  *
  * In the above example, the type of value returned by the {@link Node#getValue(TableColumn)}
  * method is determined by the column constant. However, this approach is possible only when
@@ -154,10 +154,10 @@ public interface TreeTable {
          * i.e. any modification to the returned collection are reflected immediately in the tree.
          * This allows addition or removal of child nodes as below:
          *
-         * {@preformat java
+         * {@snippet lang="java" :
          *     TreeTable.Node newNode = new ...; // Create a new node here.
          *     parent.getChildren().add(newNode);
-         * }
+         *     }
          *
          * The collection is often a {@link List}, but not necessarily. For some implementations like the
          * {@linkplain org.apache.sis.metadata.AbstractMetadata#asTreeTable() metadata tree table view},
@@ -292,8 +292,8 @@ public interface TreeTable {
          * implementations having a content fully determined by the wrapped {@linkplain #getUserObject() user
          * object} need only the following implementation:</p>
          *
-         * {@preformat java
-         *     &#64;Override
+         * {@snippet lang="java" :
+         *     @Override
          *     public boolean equals(Object obj) {
          *         return (obj instanceof MyNode) && ((MyNode) obj).getUserObject() == getUserObject();
          *     }
@@ -319,13 +319,13 @@ public interface TreeTable {
          * {@linkplain #getChildren() children}) is fully generated from the {@linkplain #getUserObject() user
          * object}, then the {@code equals(…)} and {@code hashCode()} methods may be implemented like below:
          *
-         * {@preformat java
-         *     &#64;Override
+         * {@snippet lang="java" :
+         *     @Override
          *     public boolean equals(Object obj) {
          *         return (obj instanceof MyNode) && ((MyNode) obj).getUserObject() == getUserObject();
          *     }
          *
-         *     &#64;Override
+         *     @Override
          *     public int hashCode() {
          *         return System.identityHashCode(getUserObject());
          *     }
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
index 50dba9bd63..efca6912eb 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
@@ -72,7 +72,8 @@ import org.apache.sis.util.ArgumentChecks;
  * has no value (for avoiding data lost when the node is discarded) and use the system file
  * separator as name separator:
  *
- * {@preformat java
+ * {@snippet lang="java" :
+ * class MyClass {
  *     final TableColumn columnToProtect = TableColumn.VALUE;
  *     final TableColumn columnToConcatenate = TableColumn.NAME;
  *
@@ -97,6 +98,7 @@ import org.apache.sis.util.ArgumentChecks;
  *         return node;
  *     }
  * }
+ * }
  *
  * @author  Martin Desruisseaux
  * @version 0.3
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
index d4812775c9..8cdec3448f 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakHashSet.java
@@ -50,14 +50,16 @@ import static org.apache.sis.util.collection.WeakEntry.*;
  * This is similar in spirit to the {@link String#intern()} method. The following example shows
  * a convenient way to use {@code WeakHashSet} as an internal pool of immutable objects:
  *
- * {@preformat java
- *     private final WeakHashSet<Foo> pool = new WeakHashSet<Foo>(Foo.class);
+ * {@snippet lang="java" :
+ *     class MyClass {
+ *         private final WeakHashSet<Foo> pool = new WeakHashSet<Foo>(Foo.class);
  *
- *     public Foo create(String definition) {
- *         Foo created = new Foo(definition);
- *         return pool.unique(created);
+ *         public Foo create(String definition) {
+ *             Foo created = new Foo(definition);
+ *             return pool.unique(created);
+ *         }
+ *     }
  *     }
- * }
  *
  * Thus, {@code WeakHashSet} can be used inside a factory to prevent creating duplicate immutable objects.
  *
@@ -261,7 +263,7 @@ public class WeakHashSet<E> extends AbstractSet<E> implements CheckedContainer<E
      * {@code WeakHashSet}. Otherwise, adds {@code element} to this {@code WeakHashSet}.
      * This method is functionally equivalents to the following code:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (element != null) {
      *         T current = get(element);
      *         if (current != null) {
@@ -271,7 +273,7 @@ public class WeakHashSet<E> extends AbstractSet<E> implements CheckedContainer<E
      *         }
      *     }
      *     return element;
-     * }
+     *     }
      *
      * @param  <T>      the type of the element to get. Can be {@code null}.
      * @param  element  the element to get or to add in the set if not already presents,
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
index 531e0f47e1..07028b28e3 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/WeakValueHashMap.java
@@ -47,7 +47,7 @@ import static org.apache.sis.util.collection.WeakEntry.*;
  * <p>This class is convenient for avoiding the creation of duplicated elements, as in the
  * example below:</p>
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     K key = ...
  *     V value;
  *     synchronized (map) {
@@ -57,7 +57,7 @@ import static org.apache.sis.util.collection.WeakEntry.*;
  *             map.put(key, value);
  *         }
  *     }
- * }
+ *     }
  *
  * In the above example, the calculation of a new value needs to be fast because it is performed inside a synchronized
  * statement blocking all other access to the map. This is okay if that particular {@code WeakValueHashMap} instance
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java b/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
index 80d256013f..e530f25e37 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
@@ -546,11 +546,11 @@ public class IndexedResourceBundle extends ResourceBundle implements Localized {
      * formatted using {@link MessageFormat}. Calling this method is approximately equivalent to
      * calling:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     String pattern = getString(key);
      *     Format f = new MessageFormat(pattern);
      *     return f.format(arg0);
-     * }
+     *     }
      *
      * If {@code arg0} is not already an array, it will be placed into an array of length 1. Using
      * {@link MessageFormat}, all occurrences of "{0}", "{1}", "{2}" in the resource string will be
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java
index 45f8b5c295..1941fff83d 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/package-info.java
@@ -51,24 +51,24 @@
  * provide a {@code getResources(Locale)} static method.
  * It can be used for fetching localized strings as below:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     String text = TheBundle.getResources(locale).getString(key, optionalArguments);
- * }
+ *     }
  *
  * For convenience, all {@code IndexedResourceBundle} subclasses provide also various {@code format(int, …)} static
  * methods for fetching localized texts in the {@linkplain java.util.Locale#getDefault() system default locale}:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     text = TheBundle.format(key, optionalArguments);         // Uses the default locale.
- * }
+ *     }
  *
  * If the locale is not known at method invocation time, {@code formatInternational(int, …)} static methods
  * returns a localizable string which can be localized later:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     InternationalString i18n = TheBundle.formatInternational(key, optionalArguments);
  *     String text = i18n.toString(locale);                             // Localize now.
- * }
+ *     }
  *
  * If optional arguments are present, then the following types are handled in a special way
  * (non exhaustive list):
diff --git a/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java b/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java
index 9b5cbc8181..2b81f8f9ba 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/io/AppenderTestCase.java
@@ -42,9 +42,9 @@ public abstract class AppenderTestCase extends TestCase {
     /**
      * The appender to test. Subclasses should initialize this field as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *   appender = MyAppender(appender);
-     * }
+     *   }
      */
     Appendable appender;
 
diff --git a/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java b/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java
index 0ed8601674..d291387868 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java
@@ -34,27 +34,27 @@ import static org.junit.Assert.*;
  * Watches the logs sent to the given logger.
  * For using, create a rule in the JUnit test class like below:
  *
- * {@preformat java
- *     &#64;Rule
+ * {@snippet lang="java" :
+ *     @Rule
  *     public final LoggingWatcher loggings = new LoggingWatcher(Logger.getLogger(Loggers.XML));
- * }
+ *     }
  *
  * Recommended but not mandatory, ensure that there is no unexpected logging in any tests:
  *
- * {@preformat java
- *     &#64;After
+ * {@snippet lang="java" :
+ *     @After
  *     public void assertNoUnexpectedLog() {
  *         loggings.assertNoUnexpectedLog();
  *     }
- * }
+ *     }
  *
  * In tests that are expected to emit warnings, add the following lines:
  *
- * {@preformat java
+ * {@snippet lang="java" :
  *     // Do the test here.
  *     loggings.assertNextLogContains("Some keywords", "that are expected", "to be found in the message");
  *     loggings.assertNoUnexpectedLog();
- * }
+ *     }
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.7
diff --git a/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java b/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
index 4210d71598..3be8aad442 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
@@ -59,11 +59,11 @@ public abstract strictfp class TestCase {
      * A flag for code that are pending future SIS development before to be enabled.
      * This flag is always set to {@code false}. It shall be used as below:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     if (PENDING_FUTURE_SIS_VERSION) {
      *         // Do some stuff here.
      *     }
-     * }
+     *     }
      *
      * The intent is to make easier to identify test cases that fail with the current version
      * of SIS (e.g. because of unsupported operations), but should pass in a future version.
@@ -80,9 +80,9 @@ public abstract strictfp class TestCase {
      * Tolerance threshold for strict comparisons of floating point numbers.
      * This constant can be used like below, where {@code expected} and {@code actual} are {@code double} values:
      *
-     * {@preformat java
+     * {@snippet lang="java" :
      *     assertEquals(expected, actual, STRICT);
-     * }
+     *     }
      */
     protected static final double STRICT = 0;
 
diff --git a/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java b/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
index afd784b2ee..8b1526a25e 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/test/TestSuite.java
@@ -174,8 +174,8 @@ public abstract strictfp class TestSuite {
      *
      * Subclasses shall invoke this method as below:
      *
-     * {@preformat java
-     *    &#64;BeforeClass
+     * {@snippet lang="java" :
+     *    @BeforeClass
      *    public static void verifyTestList() {
      *        assertNoMissingTest(MyTestSuite.class);
      *        verifyTestList(MyTestSuite.class);
diff --git a/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/Constraints.java b/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/Constraints.java
index 1f89733b56..106915e11e 100644
--- a/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/Constraints.java
+++ b/profiles/sis-french-profile/src/main/java/org/apache/sis/internal/profile/fra/Constraints.java
@@ -31,7 +31,7 @@ import org.apache.sis.metadata.iso.constraint.DefaultConstraints;
  *
  * <p>The following schema fragment specifies the expected content contained within this class.</p>
  *
- * {@preformat xml
+ * {@snippet lang="xml" :
  *   <complexType name="FRA_Constraints_Type">
  *     <complexContent>
  *       <extension base="{http://www.isotc211.org/2005/gmd}MD_Constraints_Type">
@@ -41,7 +41,7 @@ import org.apache.sis.metadata.iso.constraint.DefaultConstraints;
  *       </extension>
  *     </complexContent>
... 987 lines suppressed ...