From 10d84f4475428b489cd0a8a0dce734540e20dddb Mon Sep 17 00:00:00 2001
From: Michael Bowen <10384982+mikeebowen@users.noreply.github.com>
Date: Tue, 8 Apr 2025 12:07:47 -0700
Subject: [PATCH 1/2] add note to Validate documentation to specify that it
only validates the transitional format
---
.../Validation/DocumentValidator.cs | 33 +++++++++++++------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs b/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs
index 855cb7639..d743019b4 100644
--- a/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs
+++ b/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs
@@ -28,13 +28,20 @@ public DocumentValidator(ValidationCache cache)
_cache = cache;
}
+
///
- /// Validate the specified document.
+ /// Validates the specified Open XML package against the provided validation settings.
///
- /// The document to be validated.
- /// The settings to be used during validation.
- ///
- /// Return results in ValidationResult.
+ /// The to be validated.
+ /// The to use during validation.
+ /// A to observe while waiting for the validation to complete.
+ ///
+ /// A list of objects that represent the validation errors found in the package.
+ /// If no errors are found, the list will be empty.
+ ///
+ ///
+ /// Note: This method can only validate transitional Open XML documents. Strict documents are not supported.
+ ///
public List Validate(OpenXmlPackage document, ValidationSettings settings, CancellationToken token)
{
var context = new ValidationContext(document.Features.GetNamespaceResolver(), settings, _cache, token);
@@ -57,12 +64,18 @@ public List Validate(OpenXmlPackage document, ValidationSet
}
///
- /// Validate the specified part.
+ /// Validates the specified Open XML part against the provided validation settings.
///
- /// The OpenXmlPart to be validated.
- /// The settings to be used during validation.
- ///
- ///
+ /// The to be validated.
+ /// The to use during validation.
+ /// A to observe while waiting for the validation to complete.
+ ///
+ /// A list of objects that represent the validation errors found in the part.
+ /// If no errors are found, the list will be empty.
+ ///
+ ///
+ /// Note: This method can only validate transitional Open XML documents. Strict documents are not supported.
+ ///
public List Validate(OpenXmlPart part, ValidationSettings settings, CancellationToken token)
{
var context = new ValidationContext(part.Features.GetNamespaceResolver(), settings, _cache, token);
From 6f3aab9669d43a9fd2180eb428832919f0b0e054 Mon Sep 17 00:00:00 2001
From: Michael Bowen <10384982+mikeebowen@users.noreply.github.com>
Date: Tue, 8 Apr 2025 12:15:57 -0700
Subject: [PATCH 2/2] remove excessive blank line
---
.../Validation/DocumentValidator.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs b/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs
index d743019b4..df3ea4e46 100644
--- a/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs
+++ b/src/DocumentFormat.OpenXml.Framework/Validation/DocumentValidator.cs
@@ -28,7 +28,6 @@ public DocumentValidator(ValidationCache cache)
_cache = cache;
}
-
///
/// Validates the specified Open XML package against the provided validation settings.
///