40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
#
|
|
# AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
#
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: 0\n"
|
|
"POT-Creation-Date: 2013-03-12T03:19:45\n"
|
|
"PO-Revision-Date: 2013-03-12T03:19:45\n"
|
|
"Last-Translator: Automatically generated\n"
|
|
"Language-Team: None\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: application/x-publican; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
#. Tag: programlisting
|
|
#, no-c-format
|
|
msgid "\n"
|
|
"SchemaFactory factory = SchemaFactory.newInstance(\n"
|
|
" XMLConstants.W3C_XML_SCHEMA_NS_URI);\n"
|
|
"\n"
|
|
"// This enables restrictions on the schema and document\n"
|
|
"// complexity.\n"
|
|
"factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\n"
|
|
"\n"
|
|
"// This prevents resource resolution by the schema itself.\n"
|
|
"// If the schema is trusted and references additional files,\n"
|
|
"// this line must be omitted, otherwise loading these files\n"
|
|
"// will fail.\n"
|
|
"factory.setResourceResolver(new NoResourceResolver());\n"
|
|
"\n"
|
|
"Schema schema = factory.newSchema(schemaFile);\n"
|
|
"Validator validator = schema.newValidator();\n"
|
|
"\n"
|
|
"// This prevents external resource resolution.\n"
|
|
"validator.setResourceResolver(new NoResourceResolver());\n"
|
|
"\n"
|
|
"validator.validate(new SAXSource(new InputSource(inputStream)));\n"
|
|
""
|
|
msgstr ""
|
|
|