Changeset 4507 for exist


Ignore:
Timestamp:
27/11/08 17:15:50 (11 years ago)
Author:
sdonegan
Message:

Fix problem with DIFs that had description within Related_URL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/xquery/dif2moles.xq

    r4338 r4507  
    7373                    element name {data($descOnline/dif:Description)}, 
    7474                    element URL {data($descOnline/dif:URL) cast as xs:anyURI} 
    75                 else 
    76                     element name {data('URL')} 
    77                     (:element URL {encode-for-uri(data($descOnline/dif:URL))}:) 
     75                else (), 
     76                (: if logic SUCKS in Xquery.  :) 
     77                 if (not(exists($descOnline/dif:Description))) then  
     78                    element name {data('URL')}, 
     79                    element URL {data($descOnline/dif:URL) cast as xs:anyURI} 
     80                  else() 
    7881                } }               
    79             }     
     82            }    
    8083        }, 
    8184        element name {string($DIF/dif:Entry_Title)}, 
Note: See TracChangeset for help on using the changeset viewer.