Changeset 5832


Ignore:
Timestamp:
03/27/14 10:31:54 (6 years ago)
Author:
avneesh-singh
Message:

fixed anchor reference bug in DAISY 2.02 structure import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Obi/Obi/ImportExport/DAISY202Import.cs

    r5333 r5832  
    186186        { 
    187187            XmlNode anchorNode = XmlDocumentHelper.GetFirstChildElementOrSelfWithName(xNode, true, "a", xNode.NamespaceURI); 
     188            if (anchorNode == null) return null; 
    188189            XmlNode attr = anchorNode.Attributes.GetNamedItem("href"); 
    189190            return attr != null? attr.Value : null; 
     
    193194        private void addPage(XmlNode node, PageKind kind) 
    194195        { 
     196             
    195197            if (m_CurrentSection == null) throw new Exception(Localizer.Message("error_adding_page_number")); 
    196198            string pageNumberString = GetTextContent(node); 
     
    219221                n.PageNumber = number; 
    220222                m_CurrentSection.AppendChild(n); 
     223                 
    221224                if (markToDo) 
    222225                { 
     
    285288        if (RequestCancellation) return; 
    286289        string smilReferenceString = m_SectionNodesToSmilReferenceMap[section]; 
     290        if (smilReferenceString == null) continue; 
    287291        string[] StringArray = smilReferenceString.Split('#'); 
    288292        string smilFileName = StringArray[0]; 
Note: See TracChangeset for help on using the changeset viewer.