-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Export interface to MathML schema * Help others to work the MathML XSD Schema.
- Loading branch information
1 parent
4d65f56
commit f0d2b0b
Showing
2 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
mathml-core/src/test/java/com/formulasearchengine/mathmltools/mml/MathDocTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.formulasearchengine.mathmltools.mml; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import com.sun.org.apache.xerces.internal.xs.XSImplementation; | ||
import com.sun.org.apache.xerces.internal.xs.XSLoader; | ||
import com.sun.org.apache.xerces.internal.xs.XSModel; | ||
import org.junit.jupiter.api.Test; | ||
import org.w3c.dom.bootstrap.DOMImplementationRegistry; | ||
|
||
class MathDocTest { | ||
|
||
@Test | ||
void getXsdValidator() throws InstantiationException, IllegalAccessException, ClassNotFoundException { | ||
final DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); | ||
final XSImplementation impl = (XSImplementation) registry.getDOMImplementation("XS-Loader"); | ||
XSLoader loader = impl.createXSLoader(null); | ||
XSModel xsd = loader.load(MathDoc.getMathMLSchema()); | ||
assertEquals(2,xsd.getNamespaces().getLength()); | ||
} | ||
} |