You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2004/09/23 23:24:02 UTC

cvs commit: xml-xerces/c/samples/PSVIWriter PSVIWriterHandlers.hpp PSVIWriterHandlers.cpp PSVIUni.hpp PSVIUni.cpp

peiyongz    2004/09/23 14:24:02

  Modified:    c/samples/PSVIWriter PSVIWriterHandlers.hpp
                        PSVIWriterHandlers.cpp PSVIUni.hpp PSVIUni.cpp
  Log:
  Implementation of handlePartialElementPSVI()
  
  Revision  Changes    Path
  1.7       +1 -1      xml-xerces/c/samples/PSVIWriter/PSVIWriterHandlers.hpp
  
  Index: PSVIWriterHandlers.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/PSVIWriter/PSVIWriterHandlers.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PSVIWriterHandlers.hpp	21 Sep 2004 18:52:12 -0000	1.6
  +++ PSVIWriterHandlers.hpp	23 Sep 2004 21:24:02 -0000	1.7
  @@ -148,7 +148,7 @@
                                   PSVIElement* elementInfo );
   	void handlePartialElementPSVI( const XMLCh* const localName, 
                                      const XMLCh* const uri,
  -                                   PSVIElement* elementInfo ) {};
  +                                   PSVIElement* elementInfo );
   private:
       // -----------------------------------------------------------------------
       //  Private methods
  
  
  
  1.11      +67 -0     xml-xerces/c/samples/PSVIWriter/PSVIWriterHandlers.cpp
  
  Index: PSVIWriterHandlers.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/PSVIWriter/PSVIWriterHandlers.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PSVIWriterHandlers.cpp	23 Sep 2004 00:44:50 -0000	1.10
  +++ PSVIWriterHandlers.cpp	23 Sep 2004 21:24:02 -0000	1.11
  @@ -87,6 +87,12 @@
                                      chLatin_a, chLatin_l,  chLatin_u, chLatin_e, chNull };
   static const XMLCh gCommentStart[] = { chOpenAngle, chBang, chDash, chDash, chLF, chNull};
   static const XMLCh gCommentEnd[] = { chDash, chDash, chCloseAngle, chLF, chNull};
  +
  +static const XMLCh gPartialElementPSVI[] = 
  +{ chLatin_p, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_t, chLatin_i, chLatin_a, chLatin_l, 
  +  chLatin_E, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t, 
  +  chLatin_P, chLatin_S, chLatin_V, chLatin_I, chNull };
  +
   // ---------------------------------------------------------------------------
   //  PSVIWriterHandlers: Constructors and Destructor
   // ---------------------------------------------------------------------------
  @@ -365,6 +371,7 @@
   	//processSchemaErrorCode(elementInfo->getErrorCodes());
   	sendElementEmpty(PSVIUni::fgSchemaErrorCode);
   	sendElementValue(PSVIUni::fgSchemaNormalizedValue, elementInfo->getSchemaNormalizedValue());
  +	sendElementValue(PSVIUni::fgCanonicalRepresentation, elementInfo->getCanonicalRepresentation());
   	sendElementValue(PSVIUni::fgSchemaSpecified,
   		(elementInfo->getIsSchemaSpecified() ? PSVIUni::fgSchema : PSVIUni::fgInfoset));
   	sendElementValue(PSVIUni::fgSchemaDefault, elementInfo->getSchemaDefault());
  @@ -376,6 +383,66 @@
   	sendElementEmpty(PSVIUni::fgIdIdrefTable);
   	sendElementEmpty(PSVIUni::fgIdentityConstraintTable);
   	sendUnindentedElement(PSVIUni::fgElement);
  +
  +}
  +
  +/***
  + *
  + *  <partialElementPSVI>
  + *        getValidity()
  + *        getValidationAttemped()
  + *        getValidationContext()
  + *        getIsSchemaSpecified()
  + *        getElementDeclaration()
  + *        getTypeDefinition()
  + *        getMemberTypeDefinition()
  + *        getSchemaInformation()
  + *        getSchemaDefault()
  + *        getSchemaNormalizedValue()
  + *        getCanonicalRepresentation()
  + *        getNotationDeclaration()
  + *  </partialElementPSVI>
  + *
  + ***/
  +void 
  +PSVIWriterHandlers::handlePartialElementPSVI( const XMLCh*       const localName, 
  +                                              const XMLCh*       const uri,
  +                                                    PSVIElement*       elementInfo ) 
  +{
  +
  +    writeString(gCommentStart);
  +    incIndent();
  +    writeOpen(gPartialElementPSVI);
  +    incIndent();
  +
  +	processSchemaInformation(elementInfo->getSchemaInformation());
  +	sendElementValue(PSVIUni::fgValidationAttempted
  +                   , translateValidationAttempted(elementInfo->getValidationAttempted()));
  +	sendElementValue(PSVIUni::fgValidationContext
  +                   , elementInfo->getValidationContext());
  +    sendElementValue(PSVIUni::fgValidity
  +                   , translateValidity(elementInfo->getValidity()));
  +	sendElementValue(PSVIUni::fgSchemaNormalizedValue
  +                   , elementInfo->getSchemaNormalizedValue());
  +	sendElementValue(PSVIUni::fgCanonicalRepresentation
  +                   , elementInfo->getCanonicalRepresentation());
  +	sendElementValue(PSVIUni::fgSchemaSpecified
  +                  , (elementInfo->getIsSchemaSpecified() ? PSVIUni::fgSchema : PSVIUni::fgInfoset));
  +    sendElementValue(PSVIUni::fgSchemaDefault
  +                   , elementInfo->getSchemaDefault());
  +    processTypeDefinitionRef(PSVIUni::fgTypeDefinition
  +                           , elementInfo->getTypeDefinition());
  +	processTypeDefinitionRef(PSVIUni::fgMemberTypeDefinition
  +                           , elementInfo->getMemberTypeDefinition());
  +    processElementDeclarationRef(PSVIUni::fgDeclaration
  +                               , elementInfo->getElementDeclaration());
  +    sendReference(PSVIUni::fgNotation
  +                , elementInfo->getNotationDeclaration());
  +
  +    decIndent();
  +    writeClose(gPartialElementPSVI);
  +    decIndent();
  +    writeString(gCommentEnd);
   
   }
   
  
  
  
  1.3       +1 -0      xml-xerces/c/samples/PSVIWriter/PSVIUni.hpp
  
  Index: PSVIUni.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/PSVIWriter/PSVIUni.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PSVIUni.hpp	8 Sep 2004 13:55:32 -0000	1.2
  +++ PSVIUni.hpp	23 Sep 2004 21:24:02 -0000	1.3
  @@ -72,6 +72,7 @@
       static const XMLCh fgAttributeUses[];
       static const XMLCh fgAttributeWildcard[];
       static const XMLCh fgBaseTypeDefinition[];
  +    static const XMLCh fgCanonicalRepresentation[];
       static const XMLCh fgComplexTypeDefinition[];
       static const XMLCh fgCompositor[];
       static const XMLCh fgContentType[];
  
  
  
  1.3       +7 -0      xml-xerces/c/samples/PSVIWriter/PSVIUni.cpp
  
  Index: PSVIUni.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/PSVIWriter/PSVIUni.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PSVIUni.cpp	8 Sep 2004 13:55:32 -0000	1.2
  +++ PSVIUni.cpp	23 Sep 2004 21:24:02 -0000	1.3
  @@ -53,6 +53,13 @@
   	chLatin_b, chLatin_a, chLatin_s, chLatin_e, chLatin_U, chLatin_R, chLatin_I, chNull
   };
   
  +const XMLCh PSVIUni::fgCanonicalRepresentation[] =
  +{
  +    chLatin_p, chLatin_s, chLatin_v, chColon, chLatin_c, chLatin_a, chLatin_n, chLatin_o, chLatin_n, chLatin_i, chLatin_c, chLatin_a,
  +    chLatin_l, chLatin_R, chLatin_e, chLatin_p, chNull
  +
  +};
  +
   const XMLCh PSVIUni::fgCharacter[] =
   {
   	chLatin_c, chLatin_h, chLatin_a, chLatin_r, chLatin_a, chLatin_c, chLatin_t, chLatin_e, chLatin_r, chNull
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org