Fix namespace validation and move tests to OpNodeTest3 project #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses critical limitations in the OpNode namespace, prefix, and suffix functionality by replacing hardcoded validation with XML-compliant rules and consolidating all tests into the OpNodeTest3 project as requested.
Key Changes
Fixed Hardcoded Namespace Validation
The
IsValidNamespace()method inpNode.cswas previously limited to only two hardcoded values ("ns" and "prefix"), severely restricting the namespace system's usability:Enhanced Validation Examples
Now supports industry-standard namespace patterns:
math:operations,data:content,ui_controls:buttonapp-settings:config,api.v2:endpoint123invalid:test(starts with number),xml:reserved(reserved prefix)Consolidated Test Coverage in OpNodeTest3
All namespace-related tests have been moved to the OpNodeTest3 project and standardized:
UnitTest_Namespace.cs- Core namespace functionality, creation, cloning, and basic validationUnitTest_NamespaceUsability.cs- Real-world file I/O scenarios with XMLUnitTest_PrefixSuffix.cs- Dedicated testing for prefix and suffix combinationsProject Standardization
UnitTestProject1throughout the projectFile I/O Verification
Tested and verified that namespace information is properly preserved in XML export/import operations and complex hierarchical structures with mixed namespace prefixes and suffixes.
Impact
This change removes artificial constraints on namespace usage while maintaining XML compliance, enabling the OpNode system to work with industry-standard namespace conventions. The comprehensive test suite in OpNodeTest3 ensures reliability and prevents regressions.
Fixes #62.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.