diff --git a/samples/PSVIWriter/PSVIWriterHandlers.cpp b/samples/PSVIWriter/PSVIWriterHandlers.cpp
index 6a9ba9f265ec017e94a3135d8ccf93e7aa2456ca..9fa46c326bb2a565683017f9df98bde66d420b62 100644
--- a/samples/PSVIWriter/PSVIWriterHandlers.cpp
+++ b/samples/PSVIWriter/PSVIWriterHandlers.cpp
@@ -145,6 +145,7 @@ PSVIWriterHandlers::PSVIWriterHandlers(XMLFormatter* outputFormatter, XMLFormatt
 	fNSAttributes = new ValueVectorOf<unsigned int>(15);
 	fElementChildren = new ValueStackOf<bool>(20);
 	
+
 	fAttributesInfo = new RefVectorOf<AttrInfo>(8, true);
 }
 
@@ -968,13 +969,13 @@ void PSVIWriterHandlers::processParticle(XSParticle* particle) {
 		}
 		sendIndentedElement(PSVIUni::fgTerm);
 		switch (particle->getTermType()) {
-			case particle->TERM_ELEMENT:
+                                                case XSParticle::TERM_ELEMENT:
 				processElementDeclarationOrRef(particle->getElementTerm());
 				break;
-			case particle->TERM_MODELGROUP:
+                                               case XSParticle::TERM_MODELGROUP:
 				processModelGroup(particle->getModelGroupTerm());
 				break;
-			case particle->TERM_WILDCARD:
+                                               case XSParticle::TERM_WILDCARD:
 				processWildcard(particle->getWildcardTerm());
 		}
 		sendUnindentedElement(PSVIUni::fgTerm);
@@ -1560,7 +1561,7 @@ XMLCh* PSVIWriterHandlers::createID(XSObject* obj) {
 
 const XMLCh* PSVIWriterHandlers::getIdName(XSObject* obj) {
 	XMLCh* objLoc = new XMLCh[9];
-	XMLString::binToText((unsigned int)obj, objLoc, 8, 16);
+	XMLString::binToText((unsigned long)obj, objLoc, 8, 16);
 	XMLCh* idName = fIdMap->get(objLoc);
 	if (!idName) {
 		idName = createID(obj);