You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the "data\SchematronFiles\word.xml" lines 3618 - 3628 the w:val property for the w:name element should be invalid if it contains a comma only for w:name elements that are children of w:category or w:fieldMapData, but the CollectSchematronItems method from "tools\SemanticConstraintRegGen\SchematronDataProvider.cs" line 66 splits the Context on / leaving only the property name instead of the full path. So, in schematron.json the restriction becomes:
restricting the w:name property from containing commas for all elements in Word.
This may be a "won't fix", because it looks like it will either be a major rewrite of how that validation works that could involve breaking changes or creating separate classes for the different w:name elements, like FieldMapDataName and CategoryName, but this would definitely be a breaking change as they all currently use DocumentFormat.OpenXml.Wordprocessing.Name for this class. I'm adding the issue in the hope I'm wrong.
To Reproduce
Add commas to the w:val property of a w:name element that is not the child of w:fieldMapData or w:category (e.g. w:docPartPr or w:style) then create an instance of the OpenXmlValidator and validate the file.
Observed behavior
The validator returns an invalid value error for the w:val property.
Expected behavior
Expected the validation to pass without error.
Desktop (please complete the following information):
Describe the bug
According to the "data\SchematronFiles\word.xml" lines 3618 - 3628 the
w:val
property for thew:name
element should be invalid if it contains a comma only forw:name
elements that are children ofw:category
orw:fieldMapData
, but theCollectSchematronItems
method from "tools\SemanticConstraintRegGen\SchematronDataProvider.cs" line 66 splits theContext
on/
leaving only the property name instead of the full path. So, in schematron.json the restriction becomes:restricting the
w:name
property from containing commas for all elements in Word.This may be a "won't fix", because it looks like it will either be a major rewrite of how that validation works that could involve breaking changes or creating separate classes for the different
w:name
elements, likeFieldMapDataName
andCategoryName
, but this would definitely be a breaking change as they all currently useDocumentFormat.OpenXml.Wordprocessing.Name
for this class. I'm adding the issue in the hope I'm wrong.To Reproduce
Add commas to the
w:val
property of aw:name
element that is not the child ofw:fieldMapData
orw:category
(e.g.w:docPartPr
orw:style
) then create an instance of theOpenXmlValidator
and validate the file.Observed behavior
The validator returns an invalid value error for the
w:val
property.Expected behavior
Expected the validation to pass without error.
Desktop (please complete the following information):
Additional context
This was discovered from a user issue with the ooxml-validator-vscode: mikeebowen/ooxml-validator-vscode#25.
The text was updated successfully, but these errors were encountered: