<?xml version="1.0" encoding="utf-8" ?>
<!-- PDF/A-2b restriction rules -->
<Document>
<!-- PDF Limits -->
   <number_validator name = "V_Num_IntegerLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
        <min>-2147483648</min>
         <max>2147483647</max>
   </number_validator>
    <number_validator name = "V_Num_RealLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
        <min>-340300000000000000000000000000000000000.</min>
         <max>340300000000000000000000000000000000000.</max>
   </number_validator>
     <number_validator name = "V_Num_RealZero" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
        <min>0.00000000000000000000000000000000000001175</min>
   </number_validator>
   <number_validator name = "V_Num_StringLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
<!--    Note! ISO 32000_2008 says: This restriction applies only to strings in content streams! -->
         <max>32767</max>
   </number_validator>
    <number_validator name = "V_Num_NameLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
         <max>127</max>
   </number_validator>
    <number_validator name = "V_Num_IndirectObjectsLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
         <max>8288607</max>
   </number_validator>
 <!-- Maximum depth of graphics state nesting by q and Q operators.-->
   <number_validator name = "V_Num_StackLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_graphic_state">
         <max>28</max>
   </number_validator>
   <number_validator name = "V_Num_DeviceNComponentsLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_colorspace">
         <max>32</max>
   </number_validator>
   <number_validator name = "V_Num_CIDLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
         <max>65535</max>
   </number_validator>
   <number_validator name = "V_Num_PageSizeLimits" link = "6.1.13" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure">
        <min>3</min>
         <max>14400</max>
   </number_validator>
<!-- Document  syntax limitations -->
    <DummyFixer name = "V_CheckPdfStructure" link = "7.5.1" standard = "iso32000" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <DummyFixer name = "V_CheckPdfHeader" link = "6.1.2" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <DummyFixer name = "V_CheckPdfTrailer" link = "6.1.3" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <!--<DummyFixer name = "V_CheckPdfLinearizedTrailer" link = "6.1.3" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>-->
    <DummyFixer name = "V_CheckPdfXref" link = "6.1.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <DummyFixer name = "V_CheckHexString" link = "6.1.6" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <DummyFixer name = "V_CheckStream" link = "6.1.7" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <DummyFixer name = "V_CheckNameObject" link = "6.1.8" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <DummyFixer name = "V_CheckIndirectObject" link = "6.1.9" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
    <DummyFixer name = "V_CheckCommonSyntax" link = "6.1" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_doc_structure"></DummyFixer>
<!-- Common validators/fixers -->
    <DummyFixer name = "DummyFixer"></DummyFixer>
    <RemoveFixer name = "RemoveFixer"></RemoveFixer>
    <RemoveFixer name = "RemoveParentFixer1" level = "1"></RemoveFixer>
    <RemoveFixer name = "RemoveParentFixer2" level = "2"></RemoveFixer>
    <ToUnicodeFixer name = "ToUnicodeFixer" link = "9.10.2" standard = "iso32000" msg_category = "PDFA_LOG_MSG_CAT_fonts"></ToUnicodeFixer>
    <SetFixer name = "SetFixer"></SetFixer>
   <PageChecker name = "PageChecker"></PageChecker>
    <ColorSpaceFixer name = "ColorSpaceFixer"></ColorSpaceFixer>
    <FilterFixer name = "FilterFixer"></FilterFixer>
    <MetadataFixer name = "MetadataFixer"></MetadataFixer>
    <OutputIntentFixer name = "OutputIntentFixer"></OutputIntentFixer>
    <OutputIntentFixer name = "OutputIntentFixer_RGB" color = "RGB"></OutputIntentFixer>
	<UnicodeFixer name = "V_FileSpecUnicode" source = "F"></UnicodeFixer>
	<UnicodeFixer name = "V_FileSpecFromUnicode" source = "UF"></UnicodeFixer>
    <FontFixer name = "V_FontFixer"></FontFixer>
	<TransparencyUse name = "V_TransparencyUse"></TransparencyUse>
	<PageTransparencySet name = "V_PageTransparencySet"></PageTransparencySet>
	<OutlinesChecker name = "V_Outlines"></OutlinesChecker>
	<OverPrintChecker name = "V_OverPrint"></OverPrintChecker>
	<PageBoxChecker name = "V_PageBox"></PageBoxChecker>

<!-- Logical structure - checking correction -->
	<DummyFixer name = "V_MCID"></DummyFixer>
	<DummyFixer name = "V_StructElementName"></DummyFixer>
	<DummyFixer name = "V_RoleMap"></DummyFixer>
	<DummyFixer name = "V_ClassMap"></DummyFixer>
	<DummyFixer name = "RemoveTaggedStructure" msg_category = "PDFA_LOG_MSG_CAT_logical_structure"  link = "6.7.3.3" standard = "pdfa-2" ></DummyFixer>

	<DestNameChecker name = "V_DestNameCheck" link = "12.3.2.3" standard = "iso32000"></DestNameChecker>
	<UniqueNameFixer name = "V_OCC_UniqueName" object = "OCC"></UniqueNameFixer>
	<UniqueNameFixer name = "V_Colorant_UniqueName" object = "Colorant" link = "6.2.4.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_colorspace"></UniqueNameFixer>
      <dictionary_validator name = "V_FontNames" msg_category = "PDFA_LOG_MSG_CAT_fonts">
        <key name = "">
            <child_validator name = "V_Font"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_Properties">
        <key name = "">
            <child_validator name = "V_MC_Metadata"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_MC_Metadata">
        <key name = "Metadata" object="Content">
            <child_validator name = "MetadataFixer"/>
        </key>
    </dictionary_validator>
    <named_validator name = "V_NamedPageLayout" link = "7.7.2" standard = "iso32000">
        <value>SinglePage</value>
        <value>OneColumn</value>
        <value>TwoColumnLeft</value>
        <value>TwoColumnRight</value>
         <value>TwoPageLeft</value>
        <value>TwoPageRight</value>
       <!--Other values are prohibited!-->
        <child_validator name = "RemoveFixer"/>
        <!--<child_validator name = "RemoveParentFixer1"/>-->
    </named_validator>
    <named_validator name = "V_NamedPageMode" link = "7.7.2" standard = "iso32000">
        <value>UseNone</value>
        <value>UseOutlines</value>
        <value>UseThumbs</value>
        <value>FullScreen</value>
        <value>UseOC</value>
        <value>UseAttachments</value>
        <!--Other values are prohibited!-->
        <child_validator name = "RemoveFixer"/>
        <!--<child_validator name = "RemoveParentFixer1"/>-->
    </named_validator>
    <!--The Root  node  for validation - Catalog -->
    <dictionary_validator name = "V_Catalog" entry = "1" msg_category = "PDFA_LOG_MSG_CAT_catalog">
        <key name = "Type" usage = "required" link = "7.7.2" standard = "iso32000">
            <child_validator name = "V_CatalogTypeFix"/>
        </key>
        <key name = "OutputIntents" link = "6.2.3" standard = "pdfa-2">
            <child_validator name = "OutputIntentFixer"/>
        </key>
        <key name = "Annots">
            <child_validator name = "V_AnnotArray"/>
        </key>
        <key name = "Resources">
            <child_validator name = "V_Resources"/>
        </key>
        <key name = "Pages" usage = "required" link = "7.7.2" standard = "iso32000">
            <child_validator name = "VTypeReference"/>
            <child_validator name = "V_RootPages"/>
        </key>
        <key name = "AA" usage = "disabled" link = "6.5.2" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "OCProperties" link = "6.9" standard = "pdfa-2">
            <child_validator name = "V_OCProperties"/>
        </key>
        <key name = "Names">
            <child_validator name = "V_Names"/>
        </key>
        <key name = "AcroForm">
            <child_validator name = "V_AcroForm"/>
        </key>
        <key name = "NeedsRendering" usage = "disabled" link = "6.4.2" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "Outlines" link = "7.7.2" standard = "iso32000">
            <child_validator name = "VTypeReference"/>
  <!--          <child_validator name = "V_Bookmarks"/>    -->
            <child_validator name = "V_Outlines"/>
        </key>
        <!--OpenAction can be both dictionary and array! -->
        <key name = "OpenAction">
            <child_validator name = "V_Actions"/>
        </key>
        <!--Checking if no the key but it's necessary beacause of using non-calibrated color -->
        <key name = "OutputIntents" usage = "required" link = "6.2.3" standard = "pdfa-2">
            <child_validator name = "OutputIntentFixer"/>
        </key>
       <!--The optional keys of PDF 1.4 -->
        <key name = "Version"/>
        <key name = "PageLabels"/>
        <key name = "Dests" link = "7.7.2" standard = "iso32000">
            <child_validator name = "VTypeReference"/>
        </key>
        <key name = "ViewerPreferences"/>
        <key name = "PageLayout">
            <child_validator name = "V_NamedPageLayout"/>
        </key>
        <key name = "PageMode">
            <child_validator name = "V_NamedPageMode"/>
        </key>
        <key name = "Threads" link = "7.7.2" standard = "iso32000">
            <child_validator name = "VTypeReference"/>
        </key>
        <key name = "URI"/>
        <key name = "StructTreeRoot">
			<child_validator name = "V_TaggedStructure"/>
        </key>
        <key name = "MarkInfo"/>
        <key name = "Lang"/>
        <key name = "SpiderInfo"/>
        <key name = "PieceInfo"/>
         <!--The optional keys of PDF 1.5 -->
        <key name = "Perms">
            <child_validator name = "V_Permissions"/>
		</key>
        <key name = "Legal"/>
         <!--The optional keys of PDF 1.7 -->
         <key name = "Requirements" usage = "disabled" link = "6.11" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
         <key name = "Collection"/>
         <key name = "NeedsRendering" usage = "disabled" link = "6.4.2" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <!--The optional key of ISO 32000-->
        <key name = "Extensions"/>
        <!--The Metadata shall be checked after all contents have been verified - it set or remove(when a fatal problem found) the PDF/A mark -->
        <key
			object="Catalog"
            name = "Metadata"
            usage = "required"
            msg_category = "PDFA_LOG_MSG_CAT_metadata"
            link = "6.6.2.1"
            standard = "pdfa-2">
            <child_validator name = "MetadataFixer"/>
        </key>
 
        <!--other keys prohibited! -->
        <key name = "" usage = "disabled" link = "7.7.2" standard = "iso32000" severity="warning">
            <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>

<!-- Logical structure checking for complete invalidation -->
     <named_validator name = "V_PageTypeCheck" usage = "required">
        <value>Page</value>
        <child_validator name = "RemoveTaggedStructure"/>
   	</named_validator>
    <type_validator name = "VTypeReference_Tag" usage = "required">
        <value>reference</value>
        <child_validator name = "RemoveTaggedStructure"/>
   </type_validator>
      <dictionary_validator name = "V_TaggedStructure" msg_category = "PDFA_LOG_MSG_CAT_logical_structure">
          <key name = "RoleMap">
            <child_validator name = "V_RoleMap"/>
        </key>
        <key name = "ClassMap">
            <child_validator name = "V_ClassMap"/> 
        </key>
       <key name = "K">
            <child_validator name = "V_StructTree"/>
        </key>
<!--       <key name = "ParentTree" usage = "required" link = "14.7.2" standard = "iso32000">>    Acrobat does not check it -->
       <key name = "ParentTree" link = "14.7.2" standard = "iso32000">>
            <child_validator name = "V_StructParentTree"/>
        </key>
    </dictionary_validator>
      <alternate_validator name = "V_StructTree" msg_category = "PDFA_LOG_MSG_CAT_logical_structure">
        <switch name = "object_type">
            <case name = "array">
                <child_validator name = "V_StructArray"/>
            </case>
             <case name = "dictionary">
                <child_validator name = "V_StructVariant"/>
            </case>
        </switch>
    </alternate_validator>
    <array_validator name = "V_StructArray">
        <array_item>
            <child_validator name = "V_StructElementRef"/>
        </array_item>
   </array_validator>
    <dictionary_validator name = "V_StructElement" msg_category = "PDFA_LOG_MSG_CAT_logical_structure">
        <key name = "S"  usage = "required" link = "6.7.3.4" standard = "pdfa-2">
          <!--  <child_validator name = "V_StructElementName"/> -->
          <!--<child_validator name = "RemoveTaggedStructure"/>-->
       </key>
        <key name = "P"  usage = "required" link = "4.7.2" standard = "iso32000">
            <!-- <child_validator name = "V_ParentObject"/>  Now it does not work! -->
         <!--<child_validator name = "RemoveTaggedStructure"/>-->
        </key>
        <key name = "K">
            <child_validator name = "V_StructElementRef"/>
        </key>
    </dictionary_validator>
      <alternate_validator name = "V_StructElementRef" msg_category = "PDFA_LOG_MSG_CAT_logical_structure">
        <switch name = "object_type">
            <case name = "array">
                <child_validator name = "V_StructArray"/>
            </case>
             <case name = "dictionary">
                <child_validator name = "V_StructVariant"/>
            </case>
            <case name = "numeric">
                <child_validator name = "V_MCID"/>
            </case>
        </switch>
    </alternate_validator>
    <dictionary_validator  name = "V_StructVariant" msg_category = "PDFA_LOG_MSG_CAT_logical_structure">
        <switch name = "Type"  default = "StructElem">
            <case name = "MCR">
        		<key name = "MCID"  usage = "required" link = "14.7.4.2" standard = "iso32000">
            		<child_validator name = "V_MCID"/>
        		</key>
        		<key name = "Pg"  link = "14.7.4.2" standard = "iso32000">
            		<child_validator name = "VTypeReference"/>
            		<child_validator name = "V_Page_Check"/>
        		</key>
         		<key name = "Stm"  link = "14.7.4.2" standard = "iso32000">
            		<child_validator name = "VTypeReference"/>
        		</key>
         		<key name = "StmOwn"  link = "14.7.4.2" standard = "iso32000">
            		<child_validator name = "VTypeReference"/>
        		</key>
              </case>
            <case name = "OBJR">
        		<key name = "Obj"  usage = "required" link = "14.7.4.2" standard = "iso32000">
            		<child_validator name = "VTypeReference"/>
        		</key>
        		<key name = "Pg"  link = "14.7.4.2" standard = "iso32000">
            		<child_validator name = "VTypeReference"/>
            		<child_validator name = "V_Page_Check"/>
        		</key>
             </case>
            <case name = "StructElem">
       			<key name = "S"  usage = "required" link = "6.7.3.4" standard = "pdfa-2">
            		<!--<child_validator name = "V_StructElementName"/>-->
          			<!--<child_validator name = "RemoveTaggedStructure"/>-->
       		</key>
        		<key name = "P"  usage = "required" link = "14.7.4.2" standard = "iso32000">
            		<!-- <child_validator name = "V_ParentObject"/>  Now it does not work! -->
         			<!--<child_validator name = "RemoveTaggedStructure"/>-->
        		</key>
         		<key name = "Pg"  link = "14.7.4.2" standard = "iso32000">
            		<child_validator name = "VTypeReference"/>
            		<child_validator name = "V_Page_Check"/>
        		</key>
       			<key name = "K">
            		<child_validator name = "V_StructElementRef"/>
        		</key>
             </case>
        </switch>
  	</dictionary_validator>
    <dictionary_validator name = "V_StructParentTree">
       <key name = "Nums">
            <child_validator name = "V_ElementArray"/>
        </key>
        <key name = "Kids" >
            <child_validator name = "V_NumsArray"/>
        </key>
    </dictionary_validator>
    <array_validator name = "V_NumsArray">
        <array_item>
            <child_validator name = "V_StructParentTree"/>
        </array_item>
   </array_validator>
    <array_validator name = "V_ElementArray">
        <array_item index = "even" >
            <child_validator name = "DummyFixer"/>
        </array_item>
          <array_item index = "odd" >
            <child_validator name = "V_StructTree"/>
        </array_item>
   </array_validator>
    <dictionary_validator name = "V_Page_Check">
        <key name = "Type" usage = "required" link = "7.7.3.3" standard = "iso32000">
            <child_validator name = "V_PageTypeCheck"/>
		</key>
    </dictionary_validator>
<!-- end of Logical structure checking -->

    <alternate_validator name = "V_Actions">
        <switch name = "object_type">
            <case name = "array">
                <child_validator name = "V_ActionArray"/>
            </case>
            <case name = "dictionary">
                <child_validator name = "V_Action"/>
            </case>
        </switch>
    </alternate_validator>
	<array_validator name = "V_ActionArray">
		<child_validator name = "V_Action"/>
	</array_validator>
    <dictionary_validator name = "V_Names" entry = "1" msg_category = "PDFA_LOG_MSG_CAT_catalog">
        <key name = "Pages">
      <!--      <child_validator name = "V_NamedPages"/>  -->
        </key>
        <key name = "Templates">
     <!--       <child_validator name = "V_NamedPages"/>  -->
        </key>
        <key name = "EmbeddedFiles">
      			<child_validator name = "V_NamedFiles"/> 
        </key>
        <key name = "JavaScript" usage = "disabled" link = "6.5.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "Dests"/>
        <key name = "AP">
   <!--         <child_validator name = "V_NamedAPs"/>  -->
        </key>
        <key name = "IDS"/>
        <key name = "URLS"/>
        <key name = "AlternatePresentations" usage = "disabled" link = "6.10" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <!--other keys prohibited! -->
        <key name = "" usage = "disabled" link = "7.7.4" standard = "iso32000" severity="warning">
            <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>

    <dictionary_validator name = "V_NamedFiles">
       <key name = "Names">
            <child_validator name = "V_FIlesArray"/>
        </key>
        <key name = "Kids" >
            <child_validator name = "V_NamesArray"/>
        </key>
    </dictionary_validator>
    <array_validator name = "V_NamesArray">
        <array_item>
            <child_validator name = "V_NamedFiles"/>
        </array_item>
   </array_validator>

    <array_validator name = "V_FIlesArray">
        <array_item index = "even" >
            <child_validator name = "DummyFixer"/>
        </array_item>
          <array_item index = "odd" >
            <child_validator name = "V_FileSpecDict"/>
        </array_item>
   </array_validator>
    <dictionary_validator name = "V_FileSpecDict" msg_category = "PDFA_LOG_MSG_CAT_embeddedfile">
	   <key name = "Type"  usage = "required" link = "7.11.3" standard = "iso32000">
             <child_validator name = "V_FilespecTypeFix"/>
      </key>
     <key name = "EF" link = "6.8" standard = "pdfa-2">
            <child_validator name = "V_EmbeddedFileDir"/>
        </key>
        <key name = "F" usage = "required" link = "6.8" standard = "pdfa-2">
			<child_validator name = "V_FileSpecFromUnicode"/>
           <!-- <child_validator name = "V_FileName"/>  -->
        </key>
        <key name = "UF" usage = "required" link = "6.8" standard = "pdfa-2">
            <child_validator name = "V_FileSpecUnicode"/>
        </key>
		<!-- TODO:  The file specification dictionary  should contain the Desc key-->
	 </dictionary_validator>
    <dictionary_validator name = "V_EmbeddedFileDir">
        <key name = "F" usage = "required" link = "6.8" standard = "pdfa-2">
            <child_validator name = "V_EmbeddedFileStream"/>
        </key>
	 </dictionary_validator>
     <embeddedfile_validator name="V_EmbeddedFileStream">
        <child_validator name = "V_Stream_Simple_Dict"/>
     </embeddedfile_validator>
    <string_validator name = "V_FileName">
	</string_validator>

    <dictionary_validator name = "V_OCProperties">
       <key name = "OCGs" usage = "required" link = "8.11.4.2" standard = "iso32000">
            <child_validator name = "VTypeArray"/>
        </key>
        <key name = "D" usage = "required" link = "8.11.4.2" standard = "iso32000">
            <child_validator name = "V_OCConfig"/>
        </key>
        <key name = "Configs">
            <child_validator name = "V_Configs"/>
        </key>
    </dictionary_validator>
    <array_validator name = "V_Configs">
        <array_item>
            <child_validator name = "V_OCConfig"/>
        </array_item>
     </array_validator>
    <dictionary_validator name = "V_OCConfig">
       <key name = "Name" usage = "required"  link = "6.9" standard = "pdfa-2">
            <child_validator name = "V_OCC_UniqueName"/>
         </key>
        <key name = "AS" usage = "disabled" link = "6.9" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>

    <dictionary_validator name = "V_Permissions">
       <key name = "DocMDP" link = "7.7.2" standard = "iso32000">
            <child_validator name = "VTypeReference"/>
             <child_validator name = "V_SignRef"/>
       </key>
        <key name = "UR3">
              <child_validator name = "V_SignRef"/>
       </key>
        <!--other keys prohibited! -->
        <key name = "" usage = "disabled" link = "6.1.12" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_SignRef">
         <key name = "Reference" usage = "required" link = "12.8.4" standard = "iso32000">
        </key>
        <key name = "DigestLocation" usage = "disabled" link = "6.1.12" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
         <key name = "DigestMethod" usage = "disabled" link = "6.1.12" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
          <key name = "DigestValue" usage = "disabled" link = "6.1.12" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
     </dictionary_validator>

    <dictionary_validator name = "V_Resources" msg_category = "PDFA_LOG_MSG_CAT_resources">
        <key name = "XObject">
            <child_validator name = "V_XObjectNames"/>
        </key>
        <key name = "ExtGState">
            <child_validator name = "V_ExtGStateNames"/>
        </key>
        <key name = "ColorSpace">
            <child_validator name = "V_ColorSpaceNames"/>
        </key>
        <key name = "Font">
            <child_validator name = "V_FontNames"/>
            <child_validator name = "V_FontFixer"/>
        </key>
        <key name = "Pattern">
            <child_validator name = "V_PatternNames"/>
        </key>
        <key name = "Shading">
            <!--Need to rewind and check! -->
        </key>
        <key name = "ProcSet">
            <!--Need to rewind and check! -->
        </key>
        <key name = "Properties">
            <child_validator name = "V_Properties"/>
        </key>
        <!--other keys prohibited! -->
        <key name = "" usage = "disabled" link = "7.8.3" standard = "iso32000" severity="warning">
            <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_ExtGStateNames">
        <key name = "">
            <child_validator name = "V_ExtGState"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_XObjectNames" msg_category = "PDFA_LOG_MSG_CAT_xobjects">
        <key name = "">
            <child_validator name = "V_XObject"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_PatternNames" msg_category = "PDFA_LOG_MSG_CAT_colorspace">
        <key name = "">
            <child_validator name = "V_Pattern"/>
        </key>
    </dictionary_validator> 
   <dictionary_validator name = "V_ColorSpaceNames" msg_category = "PDFA_LOG_MSG_CAT_colorspace">
        <key name = "" msg_category = "PDFA_LOG_MSG_CAT_colorspace">
            <child_validator name = "ColorSpaceFixer"/>
        </key>
    </dictionary_validator>
    <named_validator name = "VNamed_BM" usage = "required">
<!-- Standard separable blend modes -->
        <value>Normal</value>
        <value>Compatible</value>
        <value>Multiply</value>
         <value>Screen</value>
         <value>Overlay</value>
         <value>Darken</value>
         <value>Lighten</value>
         <value>ColorDodge</value>
         <value>ColorBurn</value>
         <value>HardLight</value>
         <value>SoftLight</value>
          <value>Difference</value>
          <value>Exclusion</value>
<!-- Standard nonseparable blend modes -->
          <value>Hue</value>
         <value>Saturation</value>
          <value>Color</value>
          <value>Luminosity</value>
     </named_validator>
	 <named_validator name = "V_BM_Transparency" usage = "notequal">
	      <value>Normal</value>
	      <child_validator name = "V_TransparencyUse"/>
	</named_validator>
	<number_validator name = "VNum_CA" usage = "less">
	      <value>1</value>
	     <child_validator name = "V_TransparencyUse"/>
	</number_validator>
	<named_validator name = "V_GroupTransparency" usage = "equal">
	      <value>Transparency</value>
	     <child_validator name = "V_TransparencyUse"/>
	</named_validator>
	<named_validator name = "V_PageGroupTransparency" usage = "equal">
	     <value>Transparency</value>
	    <child_validator name = "V_PageTransparencySet"/>
	</named_validator>
   <named_validator name = "VNamed_None" usage = "required">
        <value>None</value>
    </named_validator>
    <boolean_validator name = "VBool_False" usage = "required">
        <value>false</value>
    </boolean_validator>
    <boolean_validator name = "VBool_False_Fix" usage = "required">
        <value>false</value>
        <child_validator name = "SetFixer"/>
    </boolean_validator>
    <named_validator name = "VNamed_PS" usage = "disabled" link = "6.2.9.3" standard = "pdfa-2">
        <value>PS</value>
        <!--<child_validator name = "RemoveParentFixer2"/> It is not so simple as it can be in Resource dictionary. Need to cleaning the Content too -->
    </named_validator>
    <named_validator name = "VNamed_Image" usage = "required" link = "8.9.5.1" standard = "iso32000">
        <value>Image</value>
    </named_validator>
    <named_validator name = "VNamed_Default" usage = "required">
        <value>Default</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_CatalogTypeFix" usage = "required">
        <value>Catalog</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_FontTypeFix" usage = "required">
        <value>Font</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_FontDescriptorTypeFix" usage = "required">
        <value>FontDescriptor</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_PagesTypeFix" usage = "required">
        <value>Pages</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_PageTypeFix" usage = "required">
        <value>Page</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_TransparencySet" usage = "required">
        <value>Transparency</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_FilespecTypeFix" usage = "required">
        <value>Filespec</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
    <named_validator name = "V_XObjectTypeFix" usage = "required" link = "8.8.1" standard = "iso32000">
        <value>Image</value>
        <value>Form</value>
        <value>PS</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
   <named_validator name = "V_FormTypeFix" usage = "required">
        <value>Form</value>
        <child_validator name = "SetFixer"/>
    </named_validator>
   <number_validator name = "VNum_Set_0" usage = "required">
        <value>0</value>
        <child_validator name = "SetFixer"/>
    </number_validator>
    <number_validator name = "VNum_Set_1" usage = "required">
        <value>1</value>
        <child_validator name = "SetFixer"/>
    </number_validator>
    <stream_validator name = "VStream_Simple">
         <child_validator name = "V_Stream_Simple_Dict"/>
    </stream_validator>
     <dictionary_validator name = "V_Stream_Simple_Dict">
		 <switch name = "Filter">
	            <case name = "Crypt">
   						<key name = "Name" link = "6.1.7.2" standard = "pdfa-2">
							<child_validator name ="V_CheckIdentity"/>
						</key>
            </case>
        </switch>
         <key name = "Filter" link = "6.1.10" standard = "pdfa-2">
            <child_validator name = "FilterFixer"/>
        </key>
    </dictionary_validator>
    <named_validator name = "V_CheckIdentity" usage = "required">
        <value>Identity</value>
    </named_validator>

   <stream_validator name = "VStream_XObject">
        <child_validator name = "V_XObject"/>
        <child_validator name = "PdfAContentValidator"/>
    </stream_validator>
    <type_validator name = "VTypeArray" usage = "required">
        <value>array</value>
   </type_validator>
     <type_validator name = "VTypeArray1" usage = "required">
        <value>array</value>
		<child_validator name = "RemoveParentFixer1"/>
   </type_validator>
    <type_validator name = "VTypeDictionary" usage = "required">
        <value>dictionary</value>
         <child_validator name = "RemoveParentFixer2"/>
  </type_validator>
   <type_validator name = "VTypeStream0" usage = "required">
        <value>stream</value>
        <child_validator name = "RemoveFixer"/>
    </type_validator>
   <type_validator name = "VTypeStream1" usage = "required">
        <value>stream</value>
        <child_validator name = "RemoveParentFixer1"/>
    </type_validator>
     <type_validator name = "VTypeStream2" usage = "required">
        <value>stream</value>
        <child_validator name = "RemoveParentFixer2"/>
    </type_validator>
   <type_validator name = "VTypeReference" usage = "required">
        <value>reference</value>
    </type_validator>
    <dictionary_validator name = "V_Bookmarks">
        <key name = "First">
            <child_validator name = "V_Bookmark_Node"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_Bookmark_Node">
        <key name = "A">
            <child_validator name = "V_Action"/>
        </key>
        <key name = "First">
            <child_validator name = "V_Bookmark_Node"/>
        </key>
        <key name = "Next">
            <child_validator name = "V_Bookmark_Node"/>
        </key>
    </dictionary_validator>
    <stream_validator name = "V_FontProgram">
        <child_validator name = "V_Stream_Simple_Dict"/>
         <child_validator name = "V_FontProgram_Dict"/>
   </stream_validator>
 	 <dictionary_validator name = "V_FontProgram_Dict">
        <key name = "Metadata" object="Font">
            <child_validator name = "MetadataFixer"/>
        </key>
        <key name = ""></key>
    </dictionary_validator>

    <stream_validator name = "V_XObject">
        <child_validator name = "V_Stream_Simple_Dict"/>
        <child_validator name = "V_XObject_Alt"/>
    </stream_validator>
    <alternate_validator  name = "V_XObject_Alt" msg_category = "PDFA_LOG_MSG_CAT_xobjects" all = "1">
        <switch name = "Subtype" default = "Image">
            <case name = "Form">
                     <child_validator name = "V_XObject_Dict"/>
                     <child_validator name = "V_FormObjectDict"/>
            </case>
            <case name = "Image">
                    <child_validator name = "V_XObject_Dict"/>
                    <child_validator name = "V_ImageObject"/>
             </case>
             <case name = "">
                    <child_validator name = "V_XObject_Dict"/>
             </case>
          </switch>
  </alternate_validator>
    <stream_validator name = "V_FormXObject">
        <child_validator name = "V_FormObjectDict"/>
    </stream_validator>
   <dictionary_validator name = "V_FormObjectDict">
          <key  name = "Subtype"  usage = "required" link = "8.10.2" standard = "iso32000">
            <child_validator name = "V_FormTypeFix"/>
		</key>
               <key name = "FormType" link = "8.10.2" standard = "iso32000">>
                    <child_validator name = "VNum_Set_1"/>
                </key>
				<key name = "BBox" usage = "required" link = "8.10.2" standard = "iso32000"/>
                <key name = "Ref" usage = "disabled" link = "6.2.9.2" standard = "pdfa-2"/>
                <key name = "OPI" usage = "disabled" link = "6.2.9.1" standard = "pdfa-2">
                    <child_validator name = "RemoveFixer"/>
                </key>
                <key name = "Subtype2">
                    <child_validator name = "VNamed_PS"/>
                </key>
                <key name = "PS" usage = "disabled" link = "6.2.9.1" standard = "pdfa-2"/>
                <key name = "Resources" usage = "required" link="6.2.2" standard = "pdfa-2">
                    <child_validator name = "V_Resources"/>
                </key>
                <key name = "Group" >
                    <child_validator name = "V_FormGroup"/>
                </key>
                <key name = "OC" >
         <!--           <child_validator name = "V_OCProperties"/> -->
                </key>
     </dictionary_validator>
     <dictionary_validator name = "V_ImageObject">
                <key name = "Alternates" usage = "disabled" link = "6.2.8.1" standard = "pdfa-2">
                    <child_validator name = "RemoveFixer"/>
                </key>
                <key name = "OPI" usage = "disabled" link = "6.2.8.1" standard = "pdfa-2">
                    <child_validator name = "RemoveFixer"/>
                </key>
                <key name = "Interpolate" link = "6.2.8.1" standard = "pdfa-2">
                    <child_validator name = "VBool_False_Fix"/>
                </key>
                <key name = "Intent" link = "6.2.6" standard = "pdfa-2">
                    <child_validator name = "V_NamedIntents"/>
                </key>
                <key name = "ColorSpace" link = "6.2.4" standard = "pdfa-2">
                    <child_validator name = "ColorSpaceFixer"/>
                </key>
                <key name = "Width" usage = "required" link = "8.9.5.1" standard = "iso32000"></key>
                <key name = "Height" usage = "required" link = "8.9.5.1" standard = "iso32000"></key>
				<switch  name = "ImageMask" default = "false">
            			<case name = "true">
 							<key name = "Mask" usage = "disabled" link = "8.9.5.1" standard = "iso32000">
                    			<child_validator name = "RemoveFixer"/>
							</key>
 							<key name = "ColorSpace" usage = "disabled" link = "8.9.5.1" standard = "iso32000">
                    			<child_validator name = "RemoveFixer"/>
							</key>
   							<key name = "Decode" link = "8.9.5.1" standard = "iso32000">
								<child_validator name ="V_CheckDecodeArray"/>
							</key>
   							<key name = "BitsPerComponent" link = "8.9.5.1" standard = "iso32000">
								<child_validator name ="VNum_Set_1"/>
							</key>
          				 </case>
            			 <case name = "false">
  							<key name = "Mask" link = "8.9.5.1" standard = "iso32000">
								<child_validator name ="V_CheckMask"/>
							</key>
          				 </case>
                </switch>
		        <key name = "SMask">
                	<child_validator name = "V_CheckSMask"/>
 		       </key>
		        <key name = "SMaskInData">
	              	<child_validator name = "V_CheckSMaskInData"/>
		       </key>
     </dictionary_validator>
	<alternate_validator name = "V_CheckSMask">
	      <switch name = "object_type">
	          <case name = "stream">
	            <child_validator name = "V_TransparencyUse"/>
	            <child_validator name = "V_XObject"/>
	          </case>
	      </switch>
	</alternate_validator>
	<number_validator name="V_CheckSMaskInData" usage="greater">
		<value>0</value>
	    <child_validator name = "V_TransparencyUse"/>
	</number_validator>
<!-- Common part for XObjects -->
    <dictionary_validator name = "V_XObject_Dict" msg_category = "PDFA_LOG_MSG_CAT_xobjects">
        <key name = "Length" usage = "required" link = "7.3.8.2" standard = "iso32000">
        </key>
        <key name = "Subtype" usage = "required" standard = "iso32000">
            <child_validator name = "V_XObjectTypeFix"/>
            <child_validator name = "VNamed_PS"/>
        </key>
       <key name = "F" usage = "disabled" link = "6.1.7.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "FFilter" usage = "disabled" link = "6.1.7.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "FDecodeParms" usage = "disabled" link = "6.1.7.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "Metadata" object="XObject">
            <child_validator name = "MetadataFixer"/>
        </key>
        <key name = ""></key>
    </dictionary_validator>

    <dictionary_validator name = "V_PageGroup">
        <key name = "S" usage = "required" link = "8.10.3" standard = "iso32000">
            <child_validator name = "V_TransparencySet"/>
            <child_validator name = "V_PageGroupTransparency"/>
        </key>
        <key name = "CS" usage = "required" link = "6.2.10" standard = "pdfa-2">
            <child_validator name = "ColorSpaceFixer"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_FormGroup">
        <key name = "S" usage = "required" link = "8.10.3" standard = "iso32000">
            <child_validator name = "V_TransparencySet"/>
            <child_validator name = "V_GroupTransparency"/>
        </key>
        <key name = "CS" usage = "required" link = "6.2.10" standard = "pdfa-2">
            <child_validator name = "ColorSpaceFixer"/>
        </key>
    </dictionary_validator>

  <!-- TODO: Make a special stream validator for Image oblject,(cannot use Thubnail as it' a special one) -->
   <alternate_validator name = "V_CheckMask">
        <switch name = "object_type">
            <case name = "stream">
                <child_validator name = "V_XObject"/>
            </case>
        </switch>
    </alternate_validator>
    <array_validator name = "V_CheckDecodeArray">
<!-- TODO: Check array Items => shall be either [0 1] or [1 0]; -->
    </array_validator>

    <!--Special validator for Thumbnail images-->
    <stream_validator name = "V_Image">
        <child_validator name = "V_Stream_Simple_Dict"/>
       <child_validator name = "V_Thumb_Dict"/>
    </stream_validator>
    <dictionary_validator name = "V_Thumb_Dict" msg_category = "PDFA_LOG_MSG_CAT_xobjects">
        <key name = "Subtype">
            <child_validator name = "VNamed_Image"/>
        </key>
        <key name = "Length" usage = "required" link = "7.3.8.2" standard = "iso32000"></key>
        <key name = "Width" usage = "required" link = "8.9.5.1" standard = "iso32000"></key>
        <key name = "Height" usage = "required" link = "8.9.5.1" standard = "iso32000"></key>
        <key name = "ColorSpace" usage = "required" link = "6.2.4" standard = "pdfa-2">
            <child_validator name = "ColorSpaceFixer"/>
        </key>
<!-- Can be skipped for ImageMask  or for JPXDecode filter -->
    <!--    <key name = "BitsPerComponent" usage = "required" link = "8.9.5.1" standard = "iso32000"></key>   -->
        <key name = "F" usage = "disabled" link = "6.1.7.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "FFilter" usage = "disabled" link = "6.1.7.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "FDecodeParms" usage = "disabled" link = "6.1.7.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "Alternates" usage = "disabled" link = "6.2.8.1" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "Metadata" object="Thumbnail">
            <child_validator name = "MetadataFixer"/>
        </key>
        <key name = ""></key>
    </dictionary_validator>
    <dictionary_validator name = "V_ExtGState" msg_category = "PDFA_LOG_MSG_CAT_graphic_state">
        <key name = "TR" usage = "disabled" link = "6.2.5" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "HTP" usage = "disabled" link = "6.2.5" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "BM" link = "6.2.10" standard = "pdfa-2">
            <child_validator name = "VNamed_BM"/>
            <child_validator name = "V_BM_Transparency"/>
        </key>
        <key name = "TR2" link = "6.2.5" standard = "pdfa-2">
            <child_validator name = "VNamed_Default"/>
        </key>
        <key name = "RI" link = "6.2.5" standard = "pdfa-2">
            <child_validator name = "V_NamedIntents"/>
       </key>
         <key name = "HT" link = "6.2.5" standard = "pdfa-2">
            <child_validator name = "V_Halftones"/>
       </key>
         <key name = "OPM" link = "6.2.4.2" standard = "pdfa-2">
            <child_validator name = "V_OverPrint"/>
       </key>
	   <key name = "CA">
	          <child_validator name = "VNum_CA"/>
	   </key>
		<key name = "ca" >
			<child_validator name = "VNum_CA"/>
		</key>
         <key name = ""></key>
    </dictionary_validator>

   <alternate_validator name = "V_Halftones">
        <switch name = "object_type">
             <case name = "name">
                <child_validator name = "VNamed_Default"/>
            </case>
           <case name = "stream">
          		 <child_validator name = "VStream_Simple"/>
                <child_validator name = "V_HalftonesStream"/>
            </case>
            <case name = "dictionary">
                <child_validator name = "V_HalftonesDir"/>
            </case>
        </switch>
    </alternate_validator>
      <stream_validator name = "V_HalftonesStream">
        <child_validator name = "V_HalftonesDir"/>
    </stream_validator>
    <dictionary_validator name = "V_HalftonesDir">
        <key name = "HalftoneType" usage = "required" link = "10.5.5" standard = "iso32000">
            <child_validator name = "V_NumHalftoneType"/>
 		</key>
       <key name = "HalftoneName" usage = "disabled" link = "6.2.5" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "TransferFunction" link = "6.2.5" standard = "pdfa-2">
    <!-- TODO:   Check this? -->
        </key>
   </dictionary_validator>
    <number_validator name = "V_NumHalftoneType" usage = "required" link = "6.2.5" standard = "pdfa-2">
        <value>1</value>
        <value>5</value>
       <child_validator name = "SetFixer"/>
    </number_validator>

   <alternate_validator name = "V_Pattern">
        <switch name = "object_type">
            <case name = "stream">
                <child_validator name = "V_PatternSteam"/>
            </case>
             <case name = "dictinary">
                <child_validator name = "V_Pattern_Dict"/>
            </case>
         </switch>
    </alternate_validator>
      <stream_validator name = "V_PatternSteam">
        <child_validator name = "V_Stream_Simple_Dict"/>
        <child_validator name = "V_Pattern_Dict"/>
    </stream_validator>
      <dictionary_validator name = "V_Pattern_Dict" msg_category = "PDFA_LOG_MSG_CAT_colorspace">
        <key name = "PatternType" usage = "required" link = "8.7.2" standard = "iso32000"/>
        <switch name = "PatternType">
            <case name = "1">
                <key name = "PaintType" usage = "required" link = "8.7.3.1" standard = "iso32000"/>
                <key name = "TilingType" usage = "required" link = "8.7.3.1" standard = "iso32000"/>
                <key name = "BBox" usage = "required" link = "8.7.3.1" standard = "iso32000"/>
                <key name = "XStep" usage = "required" link = "8.7.3.1" standard = "iso32000"/>
                <key name = "YStep" usage = "required" link = "8.7.3.1" standard = "iso32000"/>
                <key name = "Resources" usage = "required" link = "8.7.3.1" standard = "iso32000">
                    <child_validator name = "V_Resources"/>
 				</key>
			</case>
            <case name = "2">
                <key name = "Shading" usage = "required" link = "8.7.3.1" standard = "iso32000"/>
			</case>
		</switch>
    </dictionary_validator>
  <dictionary_validator name = "V_Font" msg_category = "PDFA_LOG_MSG_CAT_fonts">
        <key name = "ToUnicode" link = "9.10.2" standard = "iso32000">
			<child_validator name="ToUnicodeFixer"/>
            <child_validator name = "VStream_Simple"/>
 		</key> 
         <key name = "Type" usage = "required" link = "9.6" standard = "iso32000">
            <child_validator name = "V_FontTypeFix"/>
        </key>
        <key name = "Subtype" usage = "required" link = "9.6" standard = "iso32000"/>
       <switch name = "Subtype">
             <case name = "Type0">
                <key name = "BaseFont" usage = "required" link = "9.7.6" standard = "iso32000"/>
                <key name = "Encoding" usage = "required" link = "9.7.6" standard = "iso32000"/>
               <key name = "DescendantFonts" link = "9.7.6" standard = "iso32000">
            		<child_validator name = "V_DescendantFonts"/>
        		</key>
			</case>
           <case name = "Type1">
                <key name = "BaseFont" usage = "required" link = "9.6.2.1" standard = "iso32000"/>
                <key name = "FontDescriptor" link = "9.6.2.1" standard = "iso32000">
            		<child_validator name = "V_FontDescriptor"/>
        		</key>
			</case>
           <case name = "MMType1">
                <key name = "BaseFont" usage = "required" link = "9.6.2.1" standard = "iso32000"/>
                <key name = "FontDescriptor" link = "9.6.2.1" standard = "iso32000">
            		<child_validator name = "V_FontDescriptor"/>
        		</key>
			</case>
             <case name = "TrueType">
                <key name = "BaseFont" usage = "required" link = "9.6.3" standard = "iso32000"/>
                <key name = "FontDescriptor" link = "9.6.3" standard = "iso32000">
            		<child_validator name = "V_FontDescriptor"/>
        		</key>
			</case>
           <case name = "Type3">
                <key name = "FontBBox" usage = "required" link = "9.6.5" standard = "iso32000"/>
                <key name = "FontMatrix" usage = "required" link = "9.6.5" standard = "iso32000"/>
               <key name = "CharProcs" usage = "required" link = "9.6.5" standard = "iso32000"/>
               <key name = "Encoding" usage = "required" link = "9.6.5" standard = "iso32000"/>
               <key name = "FirstChar" usage = "required" link = "9.6.5" standard = "iso32000"/>
               <key name = "LastChar" usage = "required" link = "9.6.5" standard = "iso32000"/>
               <key name = "Widths" usage = "required" link = "9.6.5" standard = "iso32000"/>
                <key name = "FontDescriptor">
            		<child_validator name = "V_FontDescriptor"/>
        		</key>
				<key name = "Resources"  usage = "required" link="6.2.2" standard = "pdfa-2">
                    <child_validator name = "V_Resources"/>
				</key>
			</case>
            <case name = "CIDFontType0">
                <key name = "BaseFont" usage = "required" link = "9.7.4.1" standard = "iso32000"/>
                <key name = "CIDSystemInfo" usage = "required" link = "9.7.4.1" standard = "iso32000"/>
                <key name = "FontDescriptor" usage = "required" link = "9.7.4.1" standard = "iso32000">
            		<child_validator name = "V_FontDescriptor"/>
        		</key>
			</case>
            <case name = "CIDFontType2">
                <key name = "BaseFont" usage = "required" link = "9.7.4.1" standard = "iso32000"/>
                <key name = "CIDSystemInfo" usage = "required" link = "9.7.4.1" standard = "iso32000"/>
                <key name = "FontDescriptor" usage = "required" link = "9.7.4.1" standard = "iso32000">
            		<child_validator name = "V_FontDescriptor"/>
        		</key>
			</case>
		</switch>
     </dictionary_validator>
    <array_validator name = "V_DescendantFonts" size = "1">
        <array_item index = "0" link = "9.7.6" standard = "iso32000">
            <child_validator name = "V_Font"/>
        </array_item>
     </array_validator>

    <dictionary_validator name = "V_FontDescriptor" msg_category = "PDFA_LOG_MSG_CAT_fonts">
        <key name = "Type" usage = "required" standard = "iso32000" link = "9.8">
            <child_validator name = "V_FontDescriptorTypeFix"/>
        </key>
        <key name = "FontName" usage = "required" standard = "iso32000" link = "9.8"></key>
        <key name = "Flags" usage = "required" standard = "iso32000" link = "9.8"></key>
        <key name = "FontBBox" usage = "required" standard = "iso32000" link = "9.8"></key>
        <key name = "ItalicAngle" usage = "required" standard = "iso32000" link = "9.8"></key>
        <key name = "Ascent" usage = "required" standard = "iso32000" link = "9.8"></key>
        <key name = "Descent" usage = "required" standard = "iso32000" link = "9.8"></key>
        <key name = "FontFile1">
            <child_validator name = "V_FontProgram"/>
        </key>
        <key name = "FontFile2">
            <child_validator name = "V_FontProgram"/>
        </key>
        <key name = "FontFile3">
            <child_validator name = "V_FontProgram"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_RootPages" msg_category = "PDFA_LOG_MSG_CAT_pages">
        <key name = "Resources">
            <child_validator name = "V_Resources"/>
        </key>
        <key name = "Kids" usage = "required" link = "7.7.3.2" standard = "iso32000">
            <child_validator name = "V_PageArray"/>
        </key>
       <key name = "Parent" usage = "disabled" link = "7.7.3.2" standard = "iso32000">
            <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "Type" usage = "required" link = "7.7.3.2" standard = "iso32000">
            <child_validator name = "V_PagesTypeFix"/>
		</key>
        <key name = "Count" usage = "required" link = "7.7.3.2" standard = "iso32000"></key>
        <key name = ""></key>
    </dictionary_validator>
    <dictionary_validator name = "V_Pages" msg_category = "PDFA_LOG_MSG_CAT_pages">
        <key name = "Parent" usage = "required" link = "7.7.3.2" standard = "iso32000">
            <child_validator name = "VTypeReference"/>
		</key>
        <key name = "Resources">
            <child_validator name = "V_Resources"/>
        </key>
        <key name = "Kids" usage = "required" link = "7.7.3.2" standard = "iso32000">
            <child_validator name = "V_PageArray"/>
        </key>
        <key name = "Type" usage = "required" link = "7.7.3.2" standard = "iso32000">
            <child_validator name = "V_PagesTypeFix"/>
		</key>
        <key name = "Count" usage = "required" link = "7.7.3.2" standard = "iso32000"></key>
        <key name = ""></key>
    </dictionary_validator>
    <dictionary_validator name = "V_Page" msg_category = "PDFA_LOG_MSG_CAT_pages">
        <key name = "Type" usage = "required" link = "7.7.3.3" standard = "iso32000">
            <child_validator name = "V_PageTypeFix"/>
		</key>
        <key name = "AA" usage = "disabled" link = "6.5.2" standard = "pdfa-2">
             <child_validator name = "RemoveFixer"/>
        </key>
        <key name = "Annots">
            <child_validator name = "V_AnnotArray"/>
        </key>
        <key name = "Parent" usage = "required" link = "7.7.3.3" standard = "iso32000">
            <child_validator name = "VTypeReference"/>
		</key>
        <key name = "Resources">
            <child_validator name = "V_Resources"/>
        </key>
<!-- Required if there is transparency on the page  TODO: How to check this? -->
        <key name = "Group" >
            <child_validator name = "V_PageGroup"/>
        </key>
       <key name = "Contents">
            <!--<child_validator name = "V_ContentArray"/>-->
            <child_validator name = "V_ContentChecker"/>
        </key>
        <key name = "Thumb">
            <child_validator name = "V_Image"/>
        </key>
        <key name = "Metadata" object="Page">
            <child_validator name = "MetadataFixer"/>
        </key>
         <key name = "PresSteps" usage = "disabled" link = "6.10" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/>
        </key>

         <key name = "MediaBox" link = "6.1.13" standard = "pdfa-2">
            <child_validator name = "V_PageBox"/>
        </key>
         <key name = "CropBox" link = "6.1.13" standard = "pdfa-2">
            <child_validator name = "V_PageBox"/>
        </key>
         <key name = "BleedBox" link = "6.1.13" standard = "pdfa-2">
            <child_validator name = "V_PageBox"/>
        </key>
         <key name = "TrimBox" link = "6.1.13" standard = "pdfa-2">
            <child_validator name = "V_PageBox"/>
        </key>
         <key name = "ArtBox" link = "6.1.13" standard = "pdfa-2">
            <child_validator name = "V_PageBox"/>
        </key>

      <key name = ""></key>
    </dictionary_validator>
      <alternate_validator name = "V_Contents" msg_category = "PDFA_LOG_MSG_CAT_contents">
        <switch name = "object_type">
            <case name = "array">
                <child_validator name = "V_ContentArray"/>
            </case>
             <case name = "stream">
                <child_validator name = "VStream_Simple"/>
            </case>
        </switch>
    </alternate_validator>
    <array_validator name = "V_ContentArray" >
        <array_item>
            <child_validator name = "V_Contents"/>
        </array_item>
   </array_validator>

    <!--<dictionary_validator name = "V_Content" fixer = "ContentFixer"  msg_category="PDFA_LOG_MSG_CAT_contents"> -->
    <content_validator name = "V_ContentChecker" msg_category = "PDFA_LOG_MSG_CAT_contents">
        <child_validator name = "V_Contents"/> 
    </content_validator>
    <array_validator name = "V_PageArray">
        <array_item alternate = "Pages">
            <child_validator name = "V_Pages"/>
        </array_item>
        <array_item alternate = "Page">
            <child_validator name = "V_Page"/>
        </array_item>
    </array_validator>
    <array_validator name = "V_AnnotArray" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <array_item alternate = "Annot">
            <child_validator name = "V_Annot_Alt"/>
        </array_item>
        <!--/Type can be omitted to check the case use alternate with empty name-->
        <array_item alternate = "">
            <child_validator name = "V_Annot_Alt"/>
        </array_item>
    </array_validator>

    <alternate_validator  name = "V_Annot_Alt" msg_category = "PDFA_LOG_MSG_CAT_annotations" all = "1">
        <switch name = "Rect" function = "IsRectEmpty" default = "true">
            <case name = "true">
                     <child_validator name = "V_Annot"/>
            </case>
            <case name = "false">
                    <child_validator name = "V_Annot"/>
                    <child_validator name = "V_Annot_AP_Alt"/>
             </case>
        </switch>
  </alternate_validator>

    <dictionary_validator name = "V_Annot" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <key name = "Subtype" usage = "required" link = "12.5.2" standard = "iso32000">
            <child_validator name = "V_AnnotTypes"/>
        </key>
        <key name = "Rect" usage = "required" link = "12.5.2" standard = "iso32000">
               <child_validator name = "V_CheckRect"/>
       </key>
        <key name = "OC" >
<!--           <child_validator name = "V_CheckOC"/>  -->
        </key>
<!-- Checking if transparency used -->
       <key name = "CA">
          <child_validator name = "VNum_CA"/>
       </key>
       <key name = "ca">
          <child_validator name = "VNum_CA"/>
       </key>
        <switch name = "Subtype">
			 <case name = "Popup">
<!-- The key is not required , but if it  set we shall ckeck the flags! -->
        			<key
            				name = "F"
           					 all = "1"
            				link = "6.3.2"
            				standard = "pdfa-2">
            			<child_validator name = "V_AnnotFlagPrint"/>
            			<child_validator name = "V_AnnotFlagInvisible"/>
            			<child_validator name = "V_AnnotFlagHidden"/>
            			<child_validator name = "V_AnnotFlagNoView"/>
            			<child_validator name = "V_AnnotFlagToggleNoView"/>
        			</key>
 	   				<key name = "A">
						<child_validator name = "V_Action"/>
 	    			</key>
           </case>
			 <case name = "Link">
<!-- There are no AP requirements -->
        			<key
            				name = "F"
           					 usage = "required"
           					 all = "1"
            				link = "6.3.2"
            				standard = "pdfa-2">
            			<child_validator name = "V_AnnotFlagPrint"/>
            			<child_validator name = "V_AnnotFlagInvisible"/>
            			<child_validator name = "V_AnnotFlagHidden"/>
            			<child_validator name = "V_AnnotFlagNoView"/>
            			<child_validator name = "V_AnnotFlagToggleNoView"/>
        			</key>
    	   			<key name = "A">
						<child_validator name = "V_Action"/>
 	    			</key>
          </case>
            <case name = "Text">
                <key
                    name = "F"
                    usage = "required"
             		all = "1"
                    link = "6.3.2"
                    standard = "pdfa-2">
            		<child_validator name = "V_AnnotFlagPrint"/>
            			<child_validator name = "V_AnnotFlagInvisible"/>
            			<child_validator name = "V_AnnotFlagHidden"/>
            			<child_validator name = "V_AnnotFlagNoView"/>
            			<child_validator name = "V_AnnotFlagToggleNoView"/>
                    <child_validator name = "V_AnnotFlagNoZoom"/>
                    <child_validator name = "V_AnnotFlagNoRotate"/>
                </key>
 	   				<key name = "A">
						<child_validator name = "V_Action"/>
 	    			</key>
            </case>
            <case name = "Widget">
                <key
                    name = "F"
                    usage = "required"
             		all = "1"
                    link = "6.3.2"
                    standard = "pdfa-2">
            		<child_validator name = "V_AnnotFlagPrint"/>
            			<child_validator name = "V_AnnotFlagInvisible"/>
            			<child_validator name = "V_AnnotFlagHidden"/>
            			<child_validator name = "V_AnnotFlagNoView"/>
            			<child_validator name = "V_AnnotFlagToggleNoView"/>
                </key>
              <key name = "AA" usage = "disabled" link = "6.4.1" standard = "pdfa-2">
                    <child_validator name = "RemoveFixer"/>
                </key>
                <key name = "A" usage = "disabled" link = "6.4.1" standard = "pdfa-2">
                    <child_validator name = "RemoveFixer"/>
                </key>
          </case>
			<case name = "FileAttachment">
 			    <key name = "FS" usage = "required" link = "12.5.6.15" standard = "iso32000">
			            <child_validator name = "V_FileSpecDict"/>
 			    </key>
                <key
                    name = "F"
                    usage = "required"
             		all = "1"
                    link = "6.3.2"
                    standard = "pdfa-2">
            		<child_validator name = "V_AnnotFlagPrint"/>
            			<child_validator name = "V_AnnotFlagInvisible"/>
            			<child_validator name = "V_AnnotFlagHidden"/>
            			<child_validator name = "V_AnnotFlagNoView"/>
            			<child_validator name = "V_AnnotFlagToggleNoView"/>
                </key>
            </case>
             <case name = "">
<!-- It's for other annotation types -->
                <key
                    name = "F"
                    usage = "required"
             		all = "1"
                    link = "6.3.2"
                    standard = "pdfa-2">
            		<child_validator name = "V_AnnotFlagPrint"/>
             			<child_validator name = "V_AnnotFlagInvisible"/>
            			<child_validator name = "V_AnnotFlagHidden"/>
            			<child_validator name = "V_AnnotFlagNoView"/>
            			<child_validator name = "V_AnnotFlagToggleNoView"/>
                </key>
 	   				<key name = "A">
						<child_validator name = "V_Action"/>
 	    			</key>
            </case>
       </switch>
    </dictionary_validator>

    <array_validator name = "V_CheckRect" >
        <array_item index = "0" default = "0" type = "numeric"/>
        <array_item index = "1" default = "0" type = "numeric"/>
        <array_item index = "2" default = "0" type = "numeric"/>
        <array_item index = "3" default = "0" type = "numeric"/>
	    <child_validator name = "SetFixer"/>
   </array_validator>

    <alternate_validator  name = "V_Annot_AP_Alt" msg_category = "PDFA_LOG_MSG_CAT_xobjects" all = "1">
        <switch name = "Subtype" >
            <case name = "Widget">
                     <child_validator name = "V_Annot_Widget_AP"/>
             </case>
           <case name = "">
                    <child_validator name = "V_Annot_AP"/>
             </case>
        </switch>
  </alternate_validator>

    <alternate_validator  name = "V_Annot_Widget_Parent" msg_category = "PDFA_LOG_MSG_CAT_annotations" all = "1">
        <switch name = "Parent" function = "IsFTbutton" default = "false">
            <case name = "true">
                     <child_validator name = "V_Widget_AP_Dict"/>
            </case>
            <case name = "false">
                    <child_validator name = "V_Widget_AP_stream"/>
             </case>
        </switch>
  </alternate_validator>

    <alternate_validator name = "V_Annot_Widget_AP" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <switch name = "FT" default = "absent">
 			 <case name = "Btn">
                    <child_validator name = "V_Widget_AP_Dict"/>
             </case>
<!-- /FT is absent means it shall be inherited from a parent object -->
			<case name = "absent">
            		<child_validator name = "V_Annot_Widget_Parent"/>
             </case>
           <case name = "">
                    <child_validator name = "V_Widget_AP_stream"/>
             </case>
        </switch>
    </alternate_validator>

    <dictionary_validator name = "V_Annot_AP" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <switch name = "Subtype">
 			 <case name = "Popup">
<!-- There are no restrictions -->
            </case>
			 <case name = "Link">
<!-- There are no AP requirements -->
             </case>
           <case name = "Text">
                 <key name = "AP" usage = "required" link = "6.3.3" standard = "pdfa-2">
                    <child_validator name = "V_Appearence"/>
                </key>
            </case>
            <case name = "Widget">
               <key name = "AP" usage = "required" link = "6.3.3" standard = "pdfa-2">
                    <child_validator name = "V_Appearence"/>
                </key>
              </case>
           <case name = "">
<!-- It's for other annotation types -->
                 <key name = "AP" usage = "required" link = "6.3.3" standard = "pdfa-2">
                    <child_validator name = "V_Appearence"/>
                </key>
            </case>
       </switch>
    </dictionary_validator>

    <dictionary_validator name = "V_Widget_AP_Dict">
               <key name = "AP" usage = "required" link = "6.3.3" standard = "pdfa-2">
                    <child_validator name = "V_AppearenceDict"/>
                </key>
    </dictionary_validator>
    <dictionary_validator name = "V_Widget_AP_stream">
               <key name = "AP" usage = "required" link = "6.3.3" standard = "pdfa-2">
                    <child_validator name = "V_Appearence"/>
                </key>
    </dictionary_validator>

    <dictionary_validator name = "V_Appearence">
        <key name = "N" usage = "required" all = "1" link = "6.3.3" standard = "pdfa-2">
            <child_validator name = "VTypeStream2"/>
            <child_validator name = "V_FormXObject"/>
            <child_validator name = "V_ContentChecker"/>
        </key>
        <!--other keys prohibited! -->
        <key name = "" usage = "disabled" link = "6.3.3" standard = "pdfa-2">
      		 <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>
 
    <dictionary_validator name = "V_AppearenceDict">
        <key name = "N" usage = "required" all = "1" link = "6.3.3" standard = "pdfa-2">
            <child_validator name = "VTypeDictionary"/>
			<child_validator name = "V_MultipleAP"/>
        </key>
        <!--other keys prohibited! -->
        <key name = "" usage = "disabled" link = "6.3.3" standard = "pdfa-2">
      		 <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>
    <dictionary_validator name = "V_MultipleAP">
        <key name = ""  link = "12.5.6.1" all = "1" standard = "iso32000">
      		 <child_validator name = "VTypeStream2"/>
              <child_validator name = "V_XObject"/>
            <child_validator name = "V_ContentChecker"/>
      </key>
    </dictionary_validator>

   <named_validator name = "V_AnnotTypes" msg_category = "PDFA_LOG_MSG_CAT_annotations" link = "6.3.1" standard = "pdfa-2">
        <value>Text</value>
        <value>Link</value>
        <value>FreeText</value>
        <value>Line</value>
        <value>Square</value>
        <value>Circle</value>
        <value>Polygon</value>
        <value>PolyLine</value>
        <value>Highlight</value>
        <value>Underline</value>
        <value>Squiggly</value>
        <value>StrikeOut</value>
        <value>Stamp</value>
        <value>Caret</value>
        <value>Ink</value>
        <value>Popup</value>
        <value>Widget</value>
        <value>PrinterMark</value>
        <value>TrapNet</value>
        <value>FileAttachment</value>
         <value>Watermark</value>
        <value>Redact</value>
       <!--Other values are prohibited!-->
        <!--<child_validator name = "RemoveFixer"/>-->
        <child_validator name = "RemoveParentFixer1"/>
    </named_validator>
    <number_validator name = "V_AnnotFlagNoZoom" usage = "required" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <mask name = "NoZoom">8</mask>
        <child_validator name = "SetFixer"/>
    </number_validator>
     <number_validator name = "V_AnnotFlagNoRotate" usage = "required" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <mask name = "NoRotate">16</mask>
        <child_validator name = "SetFixer"/>
    </number_validator>
    <number_validator name = "V_AnnotFlagPrint" usage = "required" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <mask name = "Print">4</mask>
        <child_validator name = "SetFixer"/>
    </number_validator>
  <number_validator name = "V_AnnotFlagInvisible" usage = "disabled" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <mask name = "Invisible">1</mask>
        <child_validator name = "SetFixer"/>
    </number_validator>
    <number_validator name = "V_AnnotFlagHidden" usage = "disabled" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <mask name = "Hidden">2</mask>
        <child_validator name = "SetFixer"/>
    </number_validator>
    <number_validator name = "V_AnnotFlagNoView" usage = "disabled" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <mask name = "NoView">32</mask>
        <child_validator name = "SetFixer"/>
    </number_validator>
    <number_validator name = "V_AnnotFlagToggleNoView" usage = "disabled" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <mask name = "ToggleNoView">256</mask>
        <child_validator name = "SetFixer"/>
    </number_validator>
     <dictionary_validator name = "V_Action" msg_category = "PDFA_LOG_MSG_CAT_actions">
        <switch name = "S">
            <case name = "Named">
                <key name = "N" usage = "required" link = "6.5.1" standard = "pdfa-2">
                    <child_validator name = "V_NamedActionTypes"/>
                </key>
            </case>
             <case name = "GoTo">
                <key name = "D" usage = "required" link = "12.6.4.2" standard = "iso32000">
                    <child_validator name = "V_Destination"/>
                </key>
            </case>
            <case name = "GoToR">
                <key name = "D" usage = "required" link = "12.6.4.3" standard = "iso32000">
                    <child_validator name = "V_Destination"/>
                </key>
            </case>
             <case name = "GoToE">
                <key name = "D" usage = "required" link = "12.6.4.4" standard = "iso32000">
                    <child_validator name = "V_Destination"/>
                </key>
            </case>
            <case name = "Thread">
                <key name = "D" usage = "required" link = "12.6.4.6" standard = "iso32000">
                    <child_validator name = "V_Destination"/>
                </key>
            </case>
     </switch>
        <key name = "S" usage = "required" link = "12.6.2" standard = "iso32000">
            <child_validator name = "V_ActionTypes"/>
        </key>
        <key name = "Next">
            <child_validator name = "V_Actions"/>
        </key>
    </dictionary_validator>
    <named_validator name = "V_ActionTypes" msg_category = "PDFA_LOG_MSG_CAT_actions" link = "6.5.1" standard = "pdfa-2">
        <!--Only These values are permitted!-->
        <value>GoTo</value>
        <value>GoToR</value>
        <value>GoToE</value>
        <value>Thread</value>
        <value>URI</value>
        <value>Named</value>
        <value>SubmitForm</value>
        <!--Other values are prohibited!-->
        <child_validator name = "RemoveParentFixer1"/>
    </named_validator>
    <named_validator name = "V_NamedActionTypes">
        <value>NextPage</value>
        <value>PrevPage</value>
        <value>FirstPage</value>
        <value>LastPage</value>
        <!--Other values are prohibited!-->
        <!--TODO: Check this!  -->
        <child_validator name = "RemoveParentFixer1"/>    
    </named_validator>
      <alternate_validator name = "V_Destination">
        <switch name = "object_type">
            <case name = "array">
                <child_validator name = "V_PageCheck"/>
            </case>
             <case name = "string">
                <child_validator name = "V_DestNameCheck"/>
            </case>
       </switch>
    </alternate_validator>
    <array_validator name = "V_PageCheck">
        <array_item index = "0" link = "12.6.4.2" standard = "iso32000">
            <child_validator name = "PageChecker"/>
        </array_item>
     </array_validator>
  <dictionary_validator name = "V_AcroForm" msg_category = "PDFA_LOG_MSG_CAT_acroform">
        <key name = "DR">
            <child_validator name = "V_AF_Resources"/>
        </key>
        <key name = "Fields">
            <child_validator name = "V_Fields"/>
        </key>
         <key name = "Fields" usage = "required" link = "12.7.2" standard = "iso32000">
        	<child_validator name = "VTypeArray1"/>
        </key>

        <key name = "NeedAppearances" link = "6.4.1" standard = "pdfa-2">
            <child_validator name = "VBool_False_Fix"/>
        </key>
         <key name = "XFA" usage = "disabled" link = "6.4.2" standard = "pdfa-2">
            <child_validator name = "RemoveFixer"/> 
        </key>
   </dictionary_validator>
<!-- TODO : Check this !!! -->
    <array_validator name = "V_Fields">
        <array_item>
				<child_validator name = "V_Fields_Alt"/> 
        </array_item>
    </array_validator>

    <alternate_validator name = "V_Fields_Alt" msg_category = "PDFA_LOG_MSG_CAT_annotations">
        <switch name = "Subtype" default = "absent">
<!-- /Subtype is absent means it shall be a parent object with Kids-->
			<case name = "absent">
            		<child_validator name = "V_Annot_Kids"/>
             </case>
<!-- other annotation types cannot be a field -->
           <case name = "">
                    <child_validator name = "V_Annot_Alt"/>
             </case>
        </switch>
    </alternate_validator>
    <dictionary_validator name = "V_Annot_Kids" msg_category = "PDFA_LOG_MSG_CAT_annotations">
                 <key name = "Kids" usage = "required" >
                    <child_validator name = "V_Annot_Kids_Array"/>
                </key>
  	</dictionary_validator>
    <array_validator name = "V_Annot_Kids_Array">
        <array_item>
				<child_validator name = "V_Annot_Alt"/> 
        </array_item>
    </array_validator>

<!--AcroForm resources can have additional key /Encoding (see 8.6.1 PDF Reference) -->
    <dictionary_validator name = "V_AF_Resources" msg_category = "PDFA_LOG_MSG_CAT_resources">
        <key name = "XObject">
            <child_validator name = "V_XObjectNames"/>
        </key>
        <key name = "ExtGState">
            <child_validator name = "V_ExtGStateNames"/>
        </key>
        <key name = "ColorSpace">
            <child_validator name = "V_ColorSpaceNames"/>
        </key>
        <key name = "Font">
            <child_validator name = "V_FontNames"/>
            <child_validator name = "V_FontFixer"/>
        </key>
        <key name = "Pattern">
            <child_validator name = "V_PatternNames"/>
        </key>
        <key name = "Shading">
            <!--Need to rewind and check! -->
        </key>
        <key name = "ProcSet">
            <!--Need to rewind and check! -->
        </key>
        <key name = "Properties">
            <!--Need to rewind and check! -->
        </key>
<!--  Do not find this for PDF 1.7 but found in some files!   TODO: Refine this later! -->
        <key name = "Encoding"/>
<!--  -->
        <!--other keys prohibited! -->
        <key name = "" usage = "disabled" link = "7.8.3" standard = "iso32000" severity="warning">
            <child_validator name = "RemoveFixer"/>
        </key>
    </dictionary_validator>
    <named_validator name = "V_NamedIntents" link = "6.2.6" standard = "pdfa-2" >
        <value>RelativeColorimetric</value>
        <value>AbsoluteColorimetric</value>
        <value>Perceptual</value>
        <value>Saturation</value>
        <!--Other values are prohibited!-->
        <child_validator name = "RemoveFixer"/>
    </named_validator>
    <!--Check content of Appearence here, othe validations were done in the main branch-->
    <dictionary_validator name = "V_Annot_Acro" msg_category = "PDFA_LOG_MSG_CAT_acroform">
        <switch name = "Subtype">
            <case name = "Widget">
                 <key
                    name = "F"
                    usage = "required"
             		all = "1"
                    link = "6.3.2"
                    standard = "pdfa-2">
            		<child_validator name = "V_AnnotFlagPrint"/>
             			<child_validator name = "V_AnnotFlagInvisible"/>
            			<child_validator name = "V_AnnotFlagHidden"/>
            			<child_validator name = "V_AnnotFlagNoView"/>
            			<child_validator name = "V_AnnotFlagToggleNoView"/>
                </key>
                 <key name = "AP" usage = "required" link = "6.3.3" standard = "pdfa-2">
                    <child_validator name = "V_Appearence"/>
                </key>
                <key name = "A" usage = "disabled" link = "6.4.1" standard = "pdfa-2">
                    <child_validator name = "RemoveFixer"/>
                </key>
                <key name = "AA" usage = "disabled" link = "6.4.1" standard = "pdfa-2">
                    <child_validator name = "RemoveFixer"/>
                </key>
            </case>
        </switch>
    </dictionary_validator>
<!-- Let's use the main one
    <dictionary_validator name = "V_Appearence_Acro">
        <key name = "N" link = "6.5.3" standard = "pdfa-2">
            <child_validator name = "VTypeStream2"/>
            <child_validator name = "V_XObject"/>
            <child_validator name = "V_ContentChecker"/>
        </key>
    </dictionary_validator>
-->
<!--  validation of operators -->
    <string_validator name = "V_Operators" msg_category = "PDFA_LOG_MSG_CAT_contents" link = "6.2.2" standard = "pdfa-2">
        <value>BT</value>
        <value>h</value>
        <value>m</value>
        <value>l</value>
        <value>c</value>
        <value>v</value>
        <value>y</value>
        <value>re</value>
        <value>W</value>
        <value>W*</value>
        <value>S</value>
        <value>s</value>
        <value>f</value>
        <value>F</value>
        <value>f*</value>
        <value>B</value>
        <value>B*</value>
        <value>b</value>
        <value>b*</value>
        <value>n</value>
        <value>ET</value>
        <value>cm</value>
        <value>w</value>
        <value>J</value>
        <value>j</value>
        <value>M</value>
        <value>d</value>
        <value>ri</value>
        <value>i</value>
        <value>gs</value>
        <value>q</value>
        <value>Q</value>
        <value>CS</value>
        <value>cs</value>
        <value>SC</value>
        <value>SCN</value>
        <value>sc</value>
        <value>scn</value>
        <value>sh</value>
       <value>G</value>
        <value>g</value>
        <value>RG</value>
        <value>rg</value>
        <value>K</value>
        <value>k</value>
        <value>Tf</value>
        <value>Tc</value>
        <value>Tw</value>
        <value>Tz</value>
        <value>TL</value>
        <value>Tr</value>
        <value>Ts</value>
        <value>Tj</value>
        <value>TJ</value>
        <value>'</value>
        <value>"</value>
        <value>T*</value>
        <value>TD</value>
        <value>Td</value>
        <value>Tm</value>
        <value>Do</value>
        <value>BI</value>
        <value>ID</value>
        <value>EI</value>
        <value>BX</value>
        <value>EX</value>
        <value>MP</value>
        <value>DP</value>
        <value>BMC</value>
        <value>BDC</value>
        <value>EMC</value>
        <value>d0</value>
        <value>d1</value>
        <!--Other values are prohibited!-->
        <child_validator name = "DummyFixer"/>
    </string_validator>
<!-- Filter list -->
    <named_validator name = "V_NamedFilters" link = "6.1.7.2" standard = "pdfa-2">
        <value>ASCIIHexDecode</value>
        <value>ASCII85Decode</value>
        <value>RunLengthDecode</value>
        <value>FlateDecode</value>
       <value>CCITTFaxDecode</value>
       <value>DCTDecode</value>
       <value>JBIG2Decode</value>
        <value>JPXDecode</value>
   <!-- TODO:      <value check="Identity">Crypt</value>  -->
      <!-- The following must be replaced -->
        <value replace="FlateDecode">LZWDecode</value>
		<!-- Abbreviation is possible only for inline images => replace them on full names -->
        <value replace="ASCIIHexDecode">AHx</value>
        <value replace="ASCII85Decode">A85</value>
        <value replace="RunLengthDecode">RL</value>
        <value replace="FlateDecode">Fl</value>
       <value replace="CCITTFaxDecode">CCF</value>
       <value replace="DCTDecode">DCT</value>
        <!--Other values are prohibited!-->
    </named_validator>
    <named_validator name = "V_NamedFilters_Inline" link = "6.1.10" standard = "pdfa-2">
        <value>ASCIIHexDecode</value>
        <value>AHx</value>
        <value>ASCII85Decode</value>
        <value>A85</value>
        <value>RunLengthDecode</value>
        <value>RL</value>
        <value>FlateDecode</value>
        <value>Fl</value>
       <value>CCITTFaxDecode</value>
       <value>CCF</value>
       <value>DCTDecode</value>
       <value>DCT</value>
        <!-- The following must be replaced -->
        <value replace="FlateDecode">LZWDecode</value>
         <value replace="Fl">LZW</value>
        <!--Other values are prohibited!-->
    </named_validator>

	<dictionary_validator name = "V_Dict_InlineImageFilters">
        <key name = "Interpolate" abbr = "I" link = "6.2.8.1" standard = "pdfa-2">
            <child_validator name = "VBool_False_Fix"/>
        </key>
        <key name = "Intent" link = "6.2.6" standard = "pdfa-2">
            <child_validator name = "V_NamedIntents"/>
        </key>
        <key name = "ColorSpace" abbr = "CS" link = "6.2.4" standard = "pdfa-2">
    <!--         <child_validator name = "ColorSpaceFixer"/>   it's making special checking in code for now-->   
        </key>
        <key name = "Filter" abbr = "F" link = "6.1.7.2" standard = "pdfa-2">
            <child_validator name = "V_Filter_Inline"/>
        </key>
        <key name = "Width" abbr = "W" usage = "required" link = "8.9.5.1" standard = "iso32000"></key>
        <key name = "Height" abbr = "H" usage = "required" link = "8.9.5.1" standard = "iso32000"></key>
         <key name = "BitsPerComponent" abbr = "BPC"></key>
         <key name = "Decode" abbr = "D"></key>
         <key name = "DecodeParms" abbr = "DP"></key>
         <key name = "ImageMask" abbr = "IM"></key>
       <!--Other keys are ignored!-->
      <!--  <child_validator name = "RemoveFixer"/>  -->
	</dictionary_validator>
    <alternate_validator name = "V_Filter_Inline">
        <switch name = "object_type">
            <case name = "array">
                <child_validator name = "V_FilterArray"/>
            </case>
             <case name = "name">
                <child_validator name = "V_NamedFilters_Inline"/>
            </case>
       </switch>
	</alternate_validator >
    <array_validator name = "V_FilterArray" >
        <array_item>
            <child_validator name = "V_NamedFilters_Inline"/>
        </array_item>
   </array_validator>

<!-- Color Space checkers -->
    <DummyFixer name = "V_CheckColorSpace" link = "6.2.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_colorspace"></DummyFixer>
    <DummyFixer name = "V_CheckColorants" link = "6.2.4.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_colorspace"></DummyFixer>

<!-- Font checkers -->
   <DummyFixer name = "V_FontUnembeddedMadeEmbedded" link = "6.2.11.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontUnembeddedCannotEmbed" link = "6.2.11.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontInvalidEmbeddedFontProgram" link = "6.2.11.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontInvalidEmbeddedFontProgramFixed" link = "6.2.11.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontEmbeddedCannotEmbed" link = "6.2.11.4" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
<!-- Should  it  be ignored for 2b ? -->
  <DummyFixer name = "V_FontNoToUnicodeTranslation" link = "6.2.11.7" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontMissingGlyph" link = "6.2.11.4.2" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontTTNonSymbolicFontEncodingIllegal" link = "6.2.11.6" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
  <DummyFixer name = "V_FontTTNonSymbolicFontDifferencesIllegal" link = "6.2.11.6" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontTTSymbolicFontNotSingleCMap" link = "6.2.11.3.3" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontTTSymbolicFontEncodingRemoved" link = "6.2.11.6" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontType0CMapEmbedding" link = "6.2.11.3.3" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer> 
   <DummyFixer name = "V_FontType2CIDtoGIDAbsent" link = "6.2.11.3.2" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontType0CIDSetInconsistent" link = "6.2.11.4.2" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
   <DummyFixer name = "V_FontWidthInconsistent" link = "6.2.11.5" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
	
   <DummyFixer name = "V_FontType1CharsetMissing" link = "6.2.11.4.2" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_fonts"></DummyFixer>
	

<!-- Metadata checkers -->
   <DummyFixer name = "V_MetaDocInfoSync" link = "6.6.3" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaObjectCorrect" link = "6.6.2.1" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaXMLCorrect" link = "6.6.2.1" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaXMPPacketStructure" link = "6.6.2.1" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaXMPPacketAttributes" link = "6.6.2.1" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaXMPStructure" link = "6.6.2.3" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaXMPNamespaces" link = "6.6.2.2, TN0001" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaXMPValueCheck" link = " TN0008" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaXMPDuplicatedSchema" link = " TN0009" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaRDFQualifiedAttribute" link = " TN0009.3.3" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>
   <DummyFixer name = "V_MetaSchemaEmbedding" link = " TN0003" standard = "pdfa-2" msg_category = "PDFA_LOG_MSG_CAT_metadata"></DummyFixer>

</Document>
