예제 #1
0
void NASReader::CheckForRelations( const char *pszElement,
                                   const Attributes &attrs,
                                   char **ppszCurField )

{
    GMLFeature *poFeature = GetState()->m_poFeature;

    CPLAssert( poFeature  != NULL );

    int nIndex;
    XMLCh  Name[100];

    tr_strcpy( Name, "xlink:href" );
    nIndex = attrs.getIndex( Name );

    if( nIndex != -1 )
    {
        char *pszHRef = tr_strdup( attrs.getValue( nIndex ) );

        if( EQUALN(pszHRef,"urn:adv:oid:", 12 ) )
        {
            poFeature->AddOBProperty( pszElement, pszHRef );
            CPLFree( *ppszCurField );
            *ppszCurField = CPLStrdup( pszHRef + 12 );
        }

        CPLFree( pszHRef );
    }
}
예제 #2
0
void NASReader::PushFeature( const char *pszElement, 
                             const Attributes &attrs )

{
    int iClass;

/* -------------------------------------------------------------------- */
/*      Find the class of this element.                                 */
/* -------------------------------------------------------------------- */
    for( iClass = 0; iClass < GetClassCount(); iClass++ )
    {
        if( EQUAL(pszElement,GetClass(iClass)->GetElementName()) )
            break;
    }

/* -------------------------------------------------------------------- */
/*      Create a new feature class for this element, if there is no     */
/*      existing class for it.                                          */
/* -------------------------------------------------------------------- */
    if( iClass == GetClassCount() )
    {
        CPLAssert( !IsClassListLocked() );

        GMLFeatureClass *poNewClass = new GMLFeatureClass( pszElement );

        AddClass( poNewClass );
    }

/* -------------------------------------------------------------------- */
/*      Create a feature of this feature class.                         */
/* -------------------------------------------------------------------- */
    GMLFeature *poFeature = new GMLFeature( GetClass( iClass ) );

/* -------------------------------------------------------------------- */
/*      Create and push a new read state.                               */
/* -------------------------------------------------------------------- */
    GMLReadState *poState;

    poState = new GMLReadState();
    poState->m_poFeature = poFeature;
    PushState( poState );

/* -------------------------------------------------------------------- */
/*      Check for gml:id, and if found push it as an attribute named    */
/*      gml_id.                                                         */
/* -------------------------------------------------------------------- */
    int nFIDIndex;
    XMLCh   anFID[100];

    tr_strcpy( anFID, "gml:id" );
    nFIDIndex = attrs.getIndex( anFID );
    if( nFIDIndex != -1 )
    {
        char *pszFID = tr_strdup( attrs.getValue( nFIDIndex ) );
        SetFeatureProperty( "gml_id", pszFID );
        CPLFree( pszFID );
    }

}
예제 #3
0
    void XTandemInfileXMLHandler::startElement(const XMLCh * const /*uri*/, const XMLCh * const /*local_name*/, const XMLCh * const qname, const Attributes & attributes)
    {

      tag_.push_back(String(sm_.convert(qname)));

      if (tag_.back() == "note")
      {
        int type_idx = attributes.getIndex(sm_.convert("type"));
        int label_idx = attributes.getIndex(sm_.convert("label"));

        if (type_idx != -1)
        {
          actual_note_.note_type = String(sm_.convert(attributes.getValue(type_idx)));
        }
        if (label_idx != -1)
        {
          actual_note_.note_label = String(sm_.convert(attributes.getValue(label_idx)));
        }
      }

    }
예제 #4
0
파일: nasreader.cpp 프로젝트: afarnham/gdal
void NASReader::CheckForFID( const Attributes &attrs,
                             char **ppszCurField )

{
    int nIndex;
    XMLCh  Name[100];

    tr_strcpy( Name, "fid" );
    nIndex = attrs.getIndex( Name );

    if( nIndex != -1 )
    {
        char *pszFID = tr_strdup( attrs.getValue( nIndex ) );
        CPLString osCurField = *ppszCurField;

        osCurField += pszFID;
        CPLFree( pszFID );

        CPLFree( *ppszCurField );
        *ppszCurField = CPLStrdup(osCurField);
    }
}
예제 #5
0
void NASHandler::startElement( const XMLCh* const /* uri */,
                               const XMLCh* const localname,
                               const XMLCh* const /* qname */,
                               const Attributes& attrs )

{
    char        szElementName[MAX_TOKEN_SIZE];
    GMLReadState *poState = m_poReader->GetState();

    tr_strcpy( szElementName, localname );

    if ( ( m_bIgnoreFeature && m_nDepth >= m_nDepthFeature ) ||
         ( m_osIgnoredElement != "" && m_nDepth >= m_nDepthElement ) )
    {
        m_nDepth ++;
        return;
    }

    // ignore attributes of external references and "objektkoordinaten"
    // (see PostNAS #3 and #15)
    if ( EQUAL( szElementName, "zeigtAufExternes" ) ||
         EQUAL( szElementName, "objektkoordinaten" ) )
    {
        m_osIgnoredElement = szElementName;
        m_nDepthElement    = m_nDepth;
        m_nDepth ++;

        return;
    }

#ifdef DEBUG_VERBOSE
    CPLDebug( "NAS",
              "%*sstartElement %s m_bIgnoreFeature:%d depth:%d "
              "depthFeature:%d featureClass:%s",
              m_nDepth, "", szElementName,
              m_bIgnoreFeature, m_nDepth, m_nDepthFeature,
              poState->m_poFeature ? poState->m_poFeature->
                  GetClass()->GetElementName() : "(no feature)"
            );
#endif

/* -------------------------------------------------------------------- */
/*      If we are in the midst of collecting a feature attribute        */
/*      value, then this must be a complex attribute which we don't     */
/*      try to collect for now, so just terminate the field             */
/*      collection.                                                     */
/* -------------------------------------------------------------------- */
    if( m_pszCurField != NULL )
    {
        CPLFree( m_pszCurField );
        m_pszCurField = NULL;
    }

/* -------------------------------------------------------------------- */
/*      If we are collecting geometry, or if we determine this is a     */
/*      geometry element then append to the geometry info.              */
/* -------------------------------------------------------------------- */
    const char *pszLast = NULL;

    if( m_pszGeometry != NULL
        || IsGeometryElement( szElementName ) )
    {
        const int nLNLen = tr_strlen( localname );
        CPLString osAttributes = GetAttributes( &attrs );

        /* should save attributes too! */

        if( m_pszGeometry == NULL )
            m_nGeometryDepth = poState->m_nPathLength;

        if( m_pszGeometry == NULL ||
            m_nGeomLen + nLNLen + 4 + (int)osAttributes.size() > m_nGeomAlloc )
        {
            m_nGeomAlloc = (int) (m_nGeomAlloc * 1.3 + nLNLen + osAttributes.size() + 1000);
            m_pszGeometry = (char *)
                CPLRealloc( m_pszGeometry, m_nGeomAlloc);
        }

        strcpy( m_pszGeometry+m_nGeomLen, "<" );
        tr_strcpy( m_pszGeometry+m_nGeomLen+1, localname );

        if( osAttributes.size() > 0 )
        {
            strcat( m_pszGeometry+m_nGeomLen, " " );
            strcat( m_pszGeometry+m_nGeomLen, osAttributes );
        }

        strcat( m_pszGeometry+m_nGeomLen, ">" );
        m_nGeomLen += static_cast<int>(strlen(m_pszGeometry+m_nGeomLen));
    }

/* -------------------------------------------------------------------- */
/*      Is this the ogc:Filter element in a update operation            */
/*      (wfs:Delete, wfsext:Replace or wfs:Update)?                     */
/*      specialized sort of feature.                                    */
/* -------------------------------------------------------------------- */
    else if( EQUAL(szElementName,"Filter")
             && (pszLast = m_poReader->GetState()->GetLastComponent()) != NULL
             && (EQUAL(pszLast,"Delete") || EQUAL(pszLast,"Replace") ||
                 EQUAL(pszLast,"Update")) )
    {
        const char* pszFilteredClassName = m_poReader->GetFilteredClassName();
        if ( pszFilteredClassName != NULL &&
             strcmp("Delete", pszFilteredClassName) != 0 )
        {
            m_bIgnoreFeature = true;
            m_nDepthFeature = m_nDepth;
            m_nDepth ++;

            return;
        }

        if( m_osLastTypeName == "" )
        {
            CPLError( CE_Failure, CPLE_AssertionFailed,
                      "m_osLastTypeName == \"\"");

            m_bIgnoreFeature = true;
            m_nDepthFeature = m_nDepth;
            m_nDepth ++;
            return;
        }

        if( EQUAL( pszLast, "Replace" )  &&
            ( m_osLastReplacingFID == "" || m_osLastSafeToIgnore == "" ) )
        {
            CPLError( CE_Failure, CPLE_AssertionFailed,
                      "m_osLastReplacingFID == \"\" || "
                      "m_osLastSafeToIgnore == \"\"" );

            m_bIgnoreFeature = true;
            m_nDepthFeature = m_nDepth;
            m_nDepth ++;
            return;
        }

        if( EQUAL( pszLast, "Update" )  &&
            ( m_osLastEnded == "" || m_osLastOccasion == "" ) )
        {
            CPLError( CE_Failure, CPLE_AssertionFailed,
                      "m_osLastEnded == \"\" || m_osLastOccasion == \"\"" );

            m_bIgnoreFeature = true;
            m_nDepthFeature = m_nDepth;
            m_nDepth ++;
            return;
        }

        m_bIgnoreFeature = false;

        m_poReader->PushFeature( "Delete", attrs );

        m_nDepthFeature = m_nDepth;
        m_nDepth ++;

        m_poReader->SetFeaturePropertyDirectly(
            "typeName", CPLStrdup(m_osLastTypeName) );
        m_poReader->SetFeaturePropertyDirectly( "context", CPLStrdup(pszLast) );

        if( EQUAL( pszLast, "Replace" ) )
        {
            //CPLAssert( m_osLastReplacingFID != "" );
            //CPLAssert( m_osLastSafeToIgnore != "" );
            m_poReader->SetFeaturePropertyDirectly(
                "replacedBy", CPLStrdup(m_osLastReplacingFID) );
            m_poReader->SetFeaturePropertyDirectly(
                "safeToIgnore", CPLStrdup(m_osLastSafeToIgnore) );
        }
        else if( EQUAL( pszLast, "Update" ) )
        {
            //CPLAssert( m_osLastEnded != "" );
            //CPLAssert( m_osLastOccasion != "" );
            m_poReader->SetFeaturePropertyDirectly(
                "endet", CPLStrdup(m_osLastEnded) );
            m_poReader->SetFeaturePropertyDirectly(
                "anlass", CPLStrdup(m_osLastOccasion) );
            m_osLastEnded = "";
            m_osLastOccasion = "";
        }

        return;
    }

/* -------------------------------------------------------------------- */
/*      Is it a feature?  If so push a whole new state, and return.     */
/* -------------------------------------------------------------------- */
    else if( m_poReader->IsFeatureElement( szElementName ) )
    {
        m_osLastTypeName = szElementName;

        const char* pszFilteredClassName = m_poReader->GetFilteredClassName();

        pszLast = m_poReader->GetState()->GetLastComponent();
        if( pszLast != NULL && EQUAL(pszLast,"Replace") )
        {
            XMLCh  Name[100];

            tr_strcpy( Name, "gml:id" );
            int nIndex = attrs.getIndex( Name );

            if( nIndex == -1 || m_osLastReplacingFID !="" )
            {
                CPLError( CE_Failure, CPLE_AssertionFailed,
                          "nIndex == -1 || m_osLastReplacingFID !=\"\"" );

                m_bIgnoreFeature = true;
                m_nDepthFeature = m_nDepth;
                m_nDepth ++;

                return;
            }

            // Capture "gml:id" attribute as part of the property value -
            // primarily this is for the wfsext:Replace operation's attribute.
            char *pszReplacingFID = tr_strdup( attrs.getValue( nIndex ) );
            m_osLastReplacingFID = pszReplacingFID;
            CPLFree( pszReplacingFID );

#ifdef DEBUG_VERBOSE
            CPLDebug( "NAS", "%*s### Replace typeName=%s replacedBy=%s",
                      m_nDepth, "", m_osLastTypeName.c_str(),
                      m_osLastReplacingFID.c_str() );
#endif
        }

        if ( pszFilteredClassName != NULL &&
             strcmp(szElementName, pszFilteredClassName) != 0 )
        {
            m_bIgnoreFeature = true;
            m_nDepthFeature = m_nDepth;
            m_nDepth ++;

            return;
        }

        m_bIgnoreFeature = false;

        m_poReader->PushFeature( szElementName, attrs );

        m_nDepthFeature = m_nDepth;
        m_nDepth ++;

        return;
    }

/* -------------------------------------------------------------------- */
/*      If it is the wfs:Delete or wfs:Update element, then remember    */
/*      the typeName attribute so we can assign it to the feature that  */
/*      will be produced when we process the Filter element.            */
/* -------------------------------------------------------------------- */
    else if( EQUAL(szElementName,"Delete") || EQUAL(szElementName,"Update") )
    {
        XMLCh  Name[100];

        tr_strcpy( Name, "typeName" );
        int nIndex = attrs.getIndex( Name );

        if( nIndex != -1 )
        {
            char *pszTypeName = tr_strdup( attrs.getValue( nIndex ) );
            m_osLastTypeName = pszTypeName;
            CPLFree( pszTypeName );
        }

        m_osLastSafeToIgnore = "";
        m_osLastReplacingFID = "";

        if( EQUAL(szElementName,"Update") )
        {
            m_bInUpdate = true;
        }
    }

    else if ( m_bInUpdate && EQUAL(szElementName, "Property") )
    {
        m_bInUpdateProperty = true;
    }

    else if ( m_bInUpdateProperty && ( EQUAL(szElementName, "Name" ) ||
                                       EQUAL(szElementName, "Value" ) ) )
    {
        // collect attribute name or value
        CPLFree( m_pszCurField );
        m_pszCurField = CPLStrdup("");
    }

/* -------------------------------------------------------------------- */
/*      If it is the wfsext:Replace element, then remember the          */
/*      safeToIgnore attribute so we can assign it to the feature       */
/*      that will be produced when we process the Filter element.       */
/* -------------------------------------------------------------------- */
    else if( EQUAL(szElementName,"Replace") )
    {
        XMLCh  Name[100];

        tr_strcpy( Name, "safeToIgnore" );
        int nIndex = attrs.getIndex( Name );

        if( nIndex != -1 )
        {
            char *pszSafeToIgnore = tr_strdup( attrs.getValue( nIndex ) );
            m_osLastSafeToIgnore = pszSafeToIgnore;
            CPLFree( pszSafeToIgnore );
        }
        else
        {
            CPLError( CE_Warning, CPLE_AppDefined,
                      "NAS: safeToIgnore attribute missing" );
            m_osLastSafeToIgnore = "false";
        }

        m_osLastReplacingFID = "";
    }

/* -------------------------------------------------------------------- */
/*      If it is (or at least potentially is) a simple attribute,       */
/*      then start collecting it.                                       */
/* -------------------------------------------------------------------- */
    else if( m_poReader->IsAttributeElement( szElementName ) )
    {
        CPLFree( m_pszCurField );
        m_pszCurField = CPLStrdup("");

        // Capture href as OB property.
        m_poReader->CheckForRelations( szElementName, attrs, &m_pszCurField );

        // Capture "fid" attribute as part of the property value -
        // primarily this is for wfs:Delete operation's FeatureId attribute.
        if( EQUAL(szElementName,"FeatureId") )
            m_poReader->CheckForFID( attrs, &m_pszCurField );
    }

/* -------------------------------------------------------------------- */
/*      Push the element onto the current state's path.                 */
/* -------------------------------------------------------------------- */
    poState->PushPath( szElementName );

    m_nDepth ++;
}
void LoadDaisy3Smil2Handle::startElement(const XMLCh* const uri,
										 const XMLCh* const localname,
										 const XMLCh* const qname,
										 const Attributes& att)
{
	char* message1 = XMLString::transcode(localname);
	char* message2;

	//////////////////////////////////////////////////////////////////////////////////////
	// smil                                                            infinite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"smil")  
		||!strcmp(message1,"Smil") 
		||!strcmp(message1,"SMIL"))
	{
		//xmlns (CDATA, FIXED) "http://www.w3.org/2001/Smil2/": Specifies the default XML namespace for all elements in SMIL. See [XML-Namespaces] for details on namespaces. This attribute and its value (given in DTD) must be explicitly specified in the document instance. 
		//strDaisy3Smil2HeadXmlNs = XMLString::transcode(att.getValue(XMLString::transcode("xmlns")));
		strDaisy3Smil2HeadXmlNs = "http://www.w3.org/2001/SMIL20/";     //Fixed.

		//This is infinite element but I don't setup variable for checking the SMIL level for this version.
		return;
	}

	//////////////////////////////////////////////////////////////////////////////////////
	// meta (without scheme)                                             finite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"meta")  
		||!strcmp(message1,"Meta") 
		||!strcmp(message1,"META"))
	{
		//µÃǨÊͺ·Õè name ¡è͹¶éÒäÁèÁÕ name ¡ç¶×ÍÇèÒäÁèÁÕ meta ¹Ñé¹àÅÂ
		if (att.getIndex(XMLString::transcode("name")) != -1 )
		{
			//name (CDATA, REQUIRED) 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("name")));
				vecDaisy3Smil2HeadMetaName.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadMetaName.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::meta> This SMIL has empty name in meta tag." << endl;
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::meta> This is a serious warning on programming syntax please contact programmer" << endl;
			}

			//content (CDATA, #IMPLIED) 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("content")));
				vecDaisy3Smil2HeadMetaContent.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadMetaContent.push_back("EmPtY"); 
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::meta> This SMIL has empty content in meta tag." << endl;
			}
		}
		else
		{
			cout << "<Warning::LoadDaisy3Smil2Handle::startElement::meta> Skip this meta in SMIL because it has empty name in meta tag." << endl;
		}
		return;
	}

	//////////////////////////////////////////////////////////////////////////////////////
	// region	                                                         finite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"region")  
		||!strcmp(message1,"Region") 
		||!strcmp(message1,"REGION"))
	{
		//µÃǨÊͺ·Õè id ¡è͹¶éÒäÁèÁÕ id ¡ç¶×ÍÇèÒäÁèÁÕ region ¹Ñé¹àÅÂ
		if (att.getIndex(XMLString::transcode("id")) != -1 )
		{
			//id (ID, REQUIRED) Value of region attribute on media object references the id on appropriate region element. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("id")));
				vecDaisy3Smil2HeadRegionId.push_back(message2);		
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadRegionId.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty id in region tag." << endl;
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This is a serious warning on programming syntax please contact programmer" << endl;
			}
		
			//bottom (CDATA, 'auto') Locates region in display space. See SMIL 2.0 for details. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("bottom")));
				vecDaisy3Smil2HeadRegionBottom.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadRegionBottom.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty bottom in region tag." << endl;
			}
		
			//left (CDATA, 'auto' ) Locates region display space. See SMIL 2.0 for details. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("left")));
				vecDaisy3Smil2HeadRegionLeft.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadRegionLeft.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty left in region tag." << endl;
			}
			
			//right (CDATA, 'auto') Locates region in display space. See SMIL 2.0 for details. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("right")));
				vecDaisy3Smil2HeadRegionRight.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadRegionRight.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty right in region tag." << endl;
			}
			
			//top (CDATA, 'auto') Locates region in display space. See SMIL 2.0 for details. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("top")));
				vecDaisy3Smil2HeadRegionTop.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadRegionTop.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty top in region tag." << endl;
			}
			
			//height (CDATA, 'auto') Locates region in display space. See SMIL 2.0 for details. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("height")));
				vecDaisy3Smil2HeadRegionHeight.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data.
				vecDaisy3Smil2HeadRegionHeight.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty height in region tag." << endl;
			}
			
			//width (CDATA, 'auto') Locates region in display space. See SMIL 2.0 for details. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("width")));
				vecDaisy3Smil2HeadRegionWidth.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadRegionWidth.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty width in region tag." << endl;
			}
			
			//fit ((hidden|fill|meet|scroll|slice) 'hidden') Specifies behavior if the intrinsic height and width of a visual media object differ from those of the region in which it is displayed. See SMIL 2.0 for definitions of attribute values. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("fit")));
				vecDaisy3Smil2HeadRegionFit.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadRegionFit.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty fit in region tag." << endl;
			}
			
			//backgroundColor (CDATA, IMPLIED) Sets background color of the area of the region that is not covered by the media object(s) being displayed. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("backgroundColor")));
				vecDaisy3Smil2HeadRegionBackgroundColor.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadRegionBackgroundColor.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty backgroundColor in region tag." << endl;
			}
			
			//showBackground ((always|whenActive) 'always') Controls whether the backgroundColor of a region is shown when no media is being rendered to the region. See SMIL 2.0 for definitions of attribute values. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("showBackground")));
				vecDaisy3Smil2HeadRegionShowBackground.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadRegionShowBackground.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty showBackground in region tag." << endl;
			}
			
			//z-index (CDATA, IMPLIED) Used for control of multilayered displays. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("z-index")));
				vecDaisy3Smil2HeadRegionZIndex.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadRegionZIndex.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty z-index in region tag." << endl;
			}
			
			//xml:lang (NMTOKEN, IMPLIED)
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
				vecDaisy3Smil2HeadRegionXmlLang.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadRegionXmlLang.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> This SMIL has empty xml:lang in region tag." << endl;
			}
		}
		else
		{
			cout << "<Warning::LoadDaisy3Smil2Handle::startElement::region> Skip this Region in SMIL because it has empty id in region tag." << endl;
		}
		return;
	}

	//////////////////////////////////////////////////////////////////////////////////////
	// customTest		                                                  finite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"customtest")  
		||!strcmp(message1,"customTest") 
		||!strcmp(message1,"Customtest")
		||!strcmp(message1,"CustomTest") 
		||!strcmp(message1,"CUSTOMTEST"))
	{
		//µÃǨÊͺ·Õè id ¡è͹¶éÒäÁèÁÕ id ¡ç¶×ÍÇèÒäÁèÁÕ customTest ¹Ñé¹àÅÂ
		if (att.getIndex(XMLString::transcode("id")) != -1 )
		{
			//id (ID, REQUIRED) Id here serves as a unique identifier referenced by a customTest attribute on par or seq in body of SMIL. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("id")));
				vecDaisy3Smil2HeadCustomTestId.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadCustomTestId.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> This SMIL has empty id in customTest tag." << endl;
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> This is a serious warning on programming syntax please contact programmer" << endl;
			}
			
			//defaultState ((true|false) 'false') Specifies whether player will render (value = true) or skip (value = false) the structure during sequential playback. If no value is present, the default is false and the content is skipped. 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("defaultState")));
				vecDaisy3Smil2HeadCustomTestDefaultState.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadCustomTestDefaultState.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> This SMIL has empty defaultState in customTest tag." << endl;
			}
			
			//override ((visible|hidden) 'hidden') Specifies whether runtime resetting of defaultState should be encouraged (value= "visible") or discouraged (value = "hidden"). See section 7.4.3, "'Skippable' Structures" for normative content. 
			try
			{		
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("override")));
				vecDaisy3Smil2HeadCustomTestOverride.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadCustomTestOverride.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> This SMIL has empty override in customTest tag." << endl;
			}
			
			//class (CDATA, IMPLIED) 
			try
			{			
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("class")));
				vecDaisy3Smil2HeadCustomTestClass.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadCustomTestClass.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> This SMIL has empty class in customTest tag." << endl;
			}
			
			//title (CDATA, IMPLIED) 
			try
			{			
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("title")));
				vecDaisy3Smil2HeadCustomTestTitle.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadCustomTestTitle.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> This SMIL has empty title in customTest tag." << endl;
			}
					
			//xml:lang (NMTOKEN, IMPLIED) 
			try
			{
				message2 = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
				vecDaisy3Smil2HeadCustomTestXmlLang.push_back(message2);
			}
			catch(...)
			{
				//Push "EmPtY" for ordering reason and detects there is no data
				vecDaisy3Smil2HeadCustomTestXmlLang.push_back("EmPtY");
				cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> This SMIL has empty xml:lang in customTest tag." << endl;
			}
		}
		else
		{
			cout << "<Warning::LoadDaisy3Smil2Handle::startElement::customTest> Skip this customTest in SMIL because it has empty id in customTest tag." << endl;
		}
		return;
	}

	//////////////////////////////////////////////////////////////////////////////////////
	// seq															   infinite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"seq")  
		||!strcmp(message1,"Seq") 
		||!strcmp(message1,"SEQ"))
	{
		//clear value in all temporary strings.
		strDaisy3Smil2BodySeqTempId.clear();
		strDaisy3Smil2BodySeqTempClass.clear();
		strDaisy3Smil2BodySeqTempCustomTest.clear();
		strDaisy3Smil2BodySeqTempDur.clear();
		strDaisy3Smil2BodySeqTempXmlLang.clear();
		strDaisy3Smil2BodySeqTempEnd.clear();
		strDaisy3Smil2BodySeqTempFill.clear();

		//setup variable for find level of seq in this SMIL.
		intDaisy3Smil2BodySeqTempLevel++;

		//id (ID, REQUIRED): 
		if (att.getIndex(XMLString::transcode("id")) != -1 )
			strDaisy3Smil2BodySeqTempId = XMLString::transcode(att.getValue(XMLString::transcode("id")));
		else
			strDaisy3Smil2BodySeqTempId = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//class (CDATA, IMPLIED): Optional descriptor of this instance of the element. Can be used to identify structures such as tables and lists for which special navigation functions should be automatically invoked when entered. See section 7.4.2, "Automatic Invocation of Special Navigation Modes." Can also be used to select a presentation from the resource file. See section 10.3, "Resource File Requirements." 
		if (att.getIndex(XMLString::transcode("class")) != -1 )
			strDaisy3Smil2BodySeqTempClass = XMLString::transcode(att.getValue(XMLString::transcode("class")));
		else
			strDaisy3Smil2BodySeqTempClass = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//customTest (IDREF, IMPLIED): ID reference linking seq with matching customTest element in head. 
		if (att.getIndex(XMLString::transcode("customTest")) != -1 )
			strDaisy3Smil2BodySeqTempCustomTest = XMLString::transcode(att.getValue(XMLString::transcode("customTest")));
		else
			strDaisy3Smil2BodySeqTempCustomTest = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//dur (CDATA, IMPLIED) The duration of the seq. The value syntax is defined by the SMIL 2.0 Timing and Synchronization Module [SMIL]. 
		if (att.getIndex(XMLString::transcode("dur")) != -1 )
			strDaisy3Smil2BodySeqTempDur = XMLString::transcode(att.getValue(XMLString::transcode("dur")));
		else
			strDaisy3Smil2BodySeqTempDur = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//xml:lang (NMTOKEN, IMPLIED) 
		if (att.getIndex(XMLString::transcode("xml:lang")) != -1 )		
			strDaisy3Smil2BodySeqTempXmlLang = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
		else
			strDaisy3Smil2BodySeqTempXmlLang = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//end (CDATA, IMPLIED) Determines the active duration of Escapable or Producer Pause content. See section 7.8, "End Attribute Values", for end value syntax. See also sections 7.4.1, "'Escapable' Structures" and 7.4.11, "Producer Pauses." 
		if (att.getIndex(XMLString::transcode("end")) != -1 )			
			strDaisy3Smil2BodySeqTempEnd = XMLString::transcode(att.getValue(XMLString::transcode("end")));
		else
			strDaisy3Smil2BodySeqTempEnd = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//fill ((freeze | remove) 'remove')Determines whether a visual element is frozen at its final state or is no longer presented. See section 7.4.11, "Producer Pauses" and section 10.3.1 of "SMIL 2.0." 
		if (att.getIndex(XMLString::transcode("fill")) != -1 )			
			strDaisy3Smil2BodySeqTempFill = XMLString::transcode(att.getValue(XMLString::transcode("fill")));
		else
			strDaisy3Smil2BodySeqTempFill = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//setup variable
		if (intCountImg   > 0) 
			intCountImg++;
		if (intCountText  > 0) 
			intCountText++;
		if (intCountAudio > 0) 
			intCountAudio++;

		boolNewImg		= false;
		boolNewText		= false;
		boolNewAudio	= false;
		return;
	}

	  //////////////////////////////////////////////////////////////////////////////////////
	 // a 																infinite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"a")  
		||!strcmp(message1,"A"))
	{
		//clear value in all temporary strings.
		strDaisy3Smil2BodyAnchorTempId.clear();
		strDaisy3Smil2BodyAnchorTempClass.clear();
		strDaisy3Smil2BodyAnchorTempTitle.clear();
		strDaisy3Smil2BodyAnchorTempXmlLang.clear();
		strDaisy3Smil2BodyAnchorTempHref.clear();
		strDaisy3Smil2BodyAnchorTempExternal.clear();
		
		//id (ID, REQUIRED): 
		if (att.getIndex(XMLString::transcode("id")) != -1 )	
			strDaisy3Smil2BodyAnchorTempId = XMLString::transcode(att.getValue(XMLString::transcode("id")));
		else
			strDaisy3Smil2BodyAnchorTempId = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//class (CDATA, IMPLIED): Optional descriptor of this instance of the element. Can be used to identify structures such as tables and lists for which special navigation functions should be automatically invoked when entered. See section 7.4.2, "Automatic Invocation of Special Navigation Modes." Can also be used to select a presentation from the resource file. See section 10.3, "Resource File Requirements." 
		if (att.getIndex(XMLString::transcode("class")) != -1 )		
			strDaisy3Smil2BodyAnchorTempClass = XMLString::transcode(att.getValue(XMLString::transcode("class")));
		else
			strDaisy3Smil2BodyAnchorTempClass = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//title (CDATA, IMPLIED) 
		if (att.getIndex(XMLString::transcode("title")) != -1 )		
			strDaisy3Smil2BodyAnchorTempTitle = XMLString::transcode(att.getValue(XMLString::transcode("title")));
		else
			strDaisy3Smil2BodyAnchorTempTitle = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//xml:lang (NMTOKEN, IMPLIED) 
		if (att.getIndex(XMLString::transcode("xml:lang")) != -1 )
			strDaisy3Smil2BodyParTempXmlLang = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
		else
			strDaisy3Smil2BodyParTempXmlLang = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//href (%URI;, REQUIRED) Specifies the URI of the target of the link. The URI may include a fragment identifier. 
		if (att.getIndex(XMLString::transcode("href")) != -1 )	
			strDaisy3Smil2BodyAnchorTempHref = XMLString::transcode(att.getValue(XMLString::transcode("href")));
		else
			strDaisy3Smil2BodyAnchorTempHref = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//external ((true|false) 'false')An external link points to media content that is not part of the DTB. The external media content must be rendered by an external application, whether or not that content is renderable by the DTB player. 
		if (att.getIndex(XMLString::transcode("external")) != -1 )	
			strDaisy3Smil2BodyAnchorTempExternal = XMLString::transcode(att.getValue(XMLString::transcode("external")));
		else
			strDaisy3Smil2BodyAnchorTempExternal = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//setup variable
		if (intCountImg   > 0) 
			intCountImg++;
		if (intCountText  > 0) 
			intCountText++;
		if (intCountAudio > 0) 
			intCountAudio++;

		boolNewImg		= false;
		boolNewText		= false;
		boolNewAudio	= false;
		return;
	}

	  //////////////////////////////////////////////////////////////////////////////////////
	 // par																infinite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"par")  
		||!strcmp(message1,"Par") 
		||!strcmp(message1,"PAR"))
	{
		//clear value in all temporary strings.
		strDaisy3Smil2BodyParTempId.clear();
		strDaisy3Smil2BodyParTempClass.clear();
		strDaisy3Smil2BodyParTempCustomTest.clear();
		strDaisy3Smil2BodyParTempXmlLang.clear();
			
		//setup variable for find level of par in this SMIL.
		intDaisy3Smil2BodyParTempLevel++;

		//id (ID, REQUIRED): 
		if (att.getIndex(XMLString::transcode("id")) != -1 )		
			strDaisy3Smil2BodyParTempId = XMLString::transcode(att.getValue(XMLString::transcode("id")));
		else
			strDaisy3Smil2BodyParTempId = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//class (CDATA, IMPLIED): Optional descriptor of this instance of the element. Can be used to identify structures such as tables and lists for which special navigation functions should be automatically invoked when entered. See section 7.4.2, "Automatic Invocation of Special Navigation Modes." Can also be used to select a presentation from the resource file. See section 10.3, "Resource File Requirements." 
		if (att.getIndex(XMLString::transcode("class")) != -1 )
			strDaisy3Smil2BodyParTempClass = XMLString::transcode(att.getValue(XMLString::transcode("class")));
		else
			strDaisy3Smil2BodyParTempClass = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//customTest (IDREF, IMPLIED): ID referencing matching customTest element in head. 
		if (att.getIndex(XMLString::transcode("customTest")) != -1 )		
			strDaisy3Smil2BodyParTempCustomTest = XMLString::transcode(att.getValue(XMLString::transcode("customTest")));
		else
			strDaisy3Smil2BodyParTempCustomTest = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//xml:lang (NMTOKEN, IMPLIED) 
		if (att.getIndex(XMLString::transcode("xml:lang")) != -1 )	
			strDaisy3Smil2BodyParTempXmlLang = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
		else
			strDaisy3Smil2BodyParTempXmlLang = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//setup variable
		if (intCountImg   > 0) 
			intCountImg++;
		if (intCountText  > 0) 
			intCountText++;
		if (intCountAudio > 0) 
			intCountAudio++;

		boolNewImg		= false;
		boolNewText		= false;
		boolNewAudio	= false;
		return;
	}

	  //////////////////////////////////////////////////////////////////////////////////////
	 // img																  finite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"img")  
		||!strcmp(message1,"Img") 
		||!strcmp(message1,"IMG"))
	{
		//clear value in all temporary strings.
		strDaisy3Smil2BodyImgTempRegion.clear();
		strDaisy3Smil2BodyImgTempSrc.clear();
		strDaisy3Smil2BodyImgTempId.clear();
		strDaisy3Smil2BodyImgTempType.clear();
		strDaisy3Smil2BodyImgTempXmlLang.clear();
		
		//id (ID, IMPLIED): Optional identifier. 
		if (att.getIndex(XMLString::transcode("id")) != -1 )		
			strDaisy3Smil2BodyImgTempId = XMLString::transcode(att.getValue(XMLString::transcode("id")));
		else
			strDaisy3Smil2BodyImgTempId = "EmPtY";   //Set value to "EmPtY" because there is no data.
			
		//src (CDATA, REQUIRED): URI of image file to be rendered. 
		if (att.getIndex(XMLString::transcode("src")) != -1 )		
			strDaisy3Smil2BodyImgTempSrc = XMLString::transcode(att.getValue(XMLString::transcode("src")));
		else
			strDaisy3Smil2BodyImgTempSrc = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//type (CDATA, IMPLIED): Type of media file. 
		if (att.getIndex(XMLString::transcode("type")) != -1 )		
			strDaisy3Smil2BodyImgTempType = XMLString::transcode(att.getValue(XMLString::transcode("type")));
		else
			strDaisy3Smil2BodyImgTempType = "EmPtY";   //Set value to "EmPtY" because there is no data.
			
		//region (CDATA, IMPLIED): Specifies the region (defined in layout in document head) in which the image will be presented. References the id of the appropriate region. 
		if (att.getIndex(XMLString::transcode("region")) != -1 )		
			strDaisy3Smil2BodyImgTempRegion = XMLString::transcode(att.getValue(XMLString::transcode("region")));
		else
			strDaisy3Smil2BodyImgTempRegion = "EmPtY";   //Set value to "EmPtY" because there is no data.
			
		//xml:lang (NMTOKEN, IMPLIED) 
		if (att.getIndex(XMLString::transcode("xml:lang")) != -1 )
			strDaisy3Smil2BodyImgTempXmlLang = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
		else
			strDaisy3Smil2BodyImgTempXmlLang = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//setup variable
		intCountImg++;
		boolNewImg = true;
		return;
	}

	  //////////////////////////////////////////////////////////////////////////////////////
	 // text															  finite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"text")  
		||!strcmp(message1,"Text") 
		||!strcmp(message1,"TEXT"))
	{
		//clear value in all temporary strings.
		strDaisy3Smil2BodyTextTempId.clear();
		strDaisy3Smil2BodyTextTempSrc.clear();
		strDaisy3Smil2BodyTextTempType.clear();
		strDaisy3Smil2BodyTextTempRegion.clear();
		strDaisy3Smil2BodyTextTempXmlLang.clear();


		//id (ID, IMPLIED): Optional identifier. 
		if (att.getIndex(XMLString::transcode("id")) != -1 )	
			strDaisy3Smil2BodyTextTempId = XMLString::transcode(att.getValue(XMLString::transcode("id")));
		else
			strDaisy3Smil2BodyTextTempId = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//src (CDATA, REQUIRED): URI of fragment of textual content file to be rendered. 
		if (att.getIndex(XMLString::transcode("src")) != -1 )		
			strDaisy3Smil2BodyTextTempSrc = XMLString::transcode(att.getValue(XMLString::transcode("src")));
		else
			strDaisy3Smil2BodyTextTempSrc = "EmPtY#EmPtY";   //Set value to "EmPtY" because there is no data.

		//type (CDATA, IMPLIED): Type of media file. 
		if (att.getIndex(XMLString::transcode("type")) != -1 )		
			strDaisy3Smil2BodyTextTempType = XMLString::transcode(att.getValue(XMLString::transcode("type")));
		else
			strDaisy3Smil2BodyTextTempType = "EmPtY";   //Set value to "EmPtY" because there is no data.	

		//region (CDATA, IMPLIED): Specifies the region (defined in layout in document head) in which the text will be presented. References the id of the appropriate region. All types of text objects that are to appear in the same rendering space would be assigned the same value for region. For example, page numbers and producer's notes might both be displayed in the main text area of a screen (region="text"), while notes (e.g., footnotes) might be displayed in a separate area at the bottom of the screen (region="notes"). 
		if (att.getIndex(XMLString::transcode("region")) != -1 )		
			strDaisy3Smil2BodyTextTempRegion = XMLString::transcode(att.getValue(XMLString::transcode("region")));
		else
			strDaisy3Smil2BodyTextTempRegion = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//xml:lang (NMTOKEN, IMPLIED) 
		if (att.getIndex(XMLString::transcode("xml:lang")) != -1 )	
			strDaisy3Smil2BodyTextTempXmlLang = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
		else
			strDaisy3Smil2BodyTextTempXmlLang = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//setup variable
		intCountText++;
		boolNewText = true;
		return;
	}
	
	  //////////////////////////////////////////////////////////////////////////////////////
	 // audio														      finite element //
	//////////////////////////////////////////////////////////////////////////////////////
	if  ( !strcmp(message1,"audio")  
		||!strcmp(message1,"Audio") 
		||!strcmp(message1,"AUDIO"))
	{
		//clear value in all temporary strings.
		strDaisy3Smil2BodyAudioTempId.clear();
		strDaisy3Smil2BodyAudioTempSrc.clear();
		strDaisy3Smil2BodyAudioTempType.clear();
		strDaisy3Smil2BodyAudioTempClipBegin.clear();
		strDaisy3Smil2BodyAudioTempClipEnd.clear();
		strDaisy3Smil2BodyAudioTempRegion.clear();
		strDaisy3Smil2BodyAudioTempXmlLang.clear();
		
		//id (ID, IMPLIED): Optional identifier. 
		if (att.getIndex(XMLString::transcode("id")) != -1 )
			strDaisy3Smil2BodyAudioTempId = XMLString::transcode(att.getValue(XMLString::transcode("id")));
		else
			strDaisy3Smil2BodyAudioTempId = "EmPtY";   //Set value to "EmPtY" because there is no data.
		
		//src (CDATA, REQUIRED): URI of audio file containing clip to be rendered. 
		if (att.getIndex(XMLString::transcode("src")) != -1 )
			strDaisy3Smil2BodyAudioTempSrc = XMLString::transcode(att.getValue(XMLString::transcode("src")));
		else
			strDaisy3Smil2BodyAudioTempSrc = "EmPtY";   //Set value to "EmPtY" because there is no data.
		
		//type (CDATA, IMPLIED): Type of media file. 
		if (att.getIndex(XMLString::transcode("type")) != -1 )
			strDaisy3Smil2BodyAudioTempType = XMLString::transcode(att.getValue(XMLString::transcode("type")));
		else
			strDaisy3Smil2BodyAudioTempType = "EmPtY";   //Set value to "EmPtY" because there is no data.

		//clipBegin (CDATA, REQUIRED): Specifies the beginning of a segment of a continuous audio file as a time offset from the start of the audio file. The value syntax is defined by the SMIL 2.0 Timing and Synchronization Module [SMIL]. See section 7.7, "Media Clipping and Clock Values." 
		if (att.getIndex(XMLString::transcode("clipBegin")) != -1 )
			strDaisy3Smil2BodyAudioTempClipBegin = XMLString::transcode(att.getValue(XMLString::transcode("clipBegin")));
		else
			strDaisy3Smil2BodyAudioTempClipBegin = "EmPtY";   //Set value to "EmPtY" because there is no data.
		
		//clipEnd (CDATA, REQUIRED): Specifies the end of a segment of a continuous audio file as a time offset from the start of the audio file. It uses the same attribute value syntax as clipBegin. 
		if (att.getIndex(XMLString::transcode("clipEnd")) != -1 )
			strDaisy3Smil2BodyAudioTempClipEnd = XMLString::transcode(att.getValue(XMLString::transcode("clipEnd")));
		else
			strDaisy3Smil2BodyAudioTempClipEnd = "EmPtY";   //Set value to "EmPtY" because there is no data.
		
		//region (CDATA, IMPLIED): Specifies the region (defined in layout in document head) in which the audio object will be presented. References the id of the appropriate region. 
		if (att.getIndex(XMLString::transcode("region")) != -1 )
			strDaisy3Smil2BodyAudioTempRegion = XMLString::transcode(att.getValue(XMLString::transcode("region")));
		else
			strDaisy3Smil2BodyAudioTempRegion = "EmPtY";   //Set value to "EmPtY" because there is no data.
		
		//xml:lang (NMTOKEN, IMPLIED) 
		if (att.getIndex(XMLString::transcode("xml:lang")) != -1 )
			strDaisy3Smil2BodyAudioTempXmlLang = XMLString::transcode(att.getValue(XMLString::transcode("xml:lang")));
		else
			strDaisy3Smil2BodyAudioTempXmlLang = "EmPtY";   //Set value to "EmPtY" because there is no data.
		
		//setup variable
		intCountAudio++;
		boolNewAudio = true;
		return;
	}
}