org.newsml.toolkit.conformance
Class XMLLangTest

java.lang.Object
  |
  +--org.newsml.toolkit.conformance.TestBase
        |
        +--org.newsml.toolkit.conformance.XMLLangTest

public class XMLLangTest
extends TestBase

Validate the values of an xml:lang attributes in the document.

This test verifies that the value conforms to the syntactic requirements of IETF RFC 1766, and warns about unrecognized language or country codes.

Version:
2.0
Author:
Reuters PLC
See Also:
TestBase

Constructor Summary
XMLLangTest()
           
 
Method Summary
 void run(BaseNode node, boolean useExternal)
          Run tests for a Text node with a language code.
 
Methods inherited from class org.newsml.toolkit.conformance.TestBase
error, internal, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLLangTest

public XMLLangTest()
Method Detail

run

public void run(BaseNode node,
                boolean useExternal)
         throws NewsMLException
Run tests for a Text node with a language code.
Overrides:
run in class TestBase
Parameters:
node - A Text node containing the value of an xml:lang attribute.
Throws:
NewsMLException - If the test fails.
java.lang.ClassCastException - If the node parameter is not an instance of Text.
See Also:
TestBase.run(org.newsml.toolkit.BaseNode, boolean)