mirror of
				https://github.com/qurator-spk/modstool.git
				synced 2025-11-03 19:04:13 +01:00 
			
		
		
		
	🚧 alto4pandas: Determine ALTO namespace for group
This commit is contained in:
		
							parent
							
								
									53a8db955c
								
							
						
					
					
						commit
						de50f13043
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -34,6 +34,8 @@ def alto_to_dict(alto, raise_errors=True):
 | 
			
		|||
        group = list(group)
 | 
			
		||||
 | 
			
		||||
        localname = ET.QName(tag).localname
 | 
			
		||||
        alto_namespace = ET.QName(tag).namespace
 | 
			
		||||
        namespaces={"alto": alto_namespace}
 | 
			
		||||
 | 
			
		||||
        if localname == 'Description':
 | 
			
		||||
            value[localname] = TagGroup(tag, group).is_singleton().has_no_attributes().descend(raise_errors)
 | 
			
		||||
| 
						 | 
				
			
			@ -76,9 +78,6 @@ def alto_to_dict(alto, raise_errors=True):
 | 
			
		|||
        elif localname == 'Layout':
 | 
			
		||||
            value[localname] = TagGroup(tag, group).is_singleton().has_no_attributes().descend(raise_errors)
 | 
			
		||||
        elif localname == 'Page':
 | 
			
		||||
            alto_namespace = ET.QName(group[0]).namespace
 | 
			
		||||
            namespaces={"alto": alto_namespace}
 | 
			
		||||
 | 
			
		||||
            value[localname] = {}
 | 
			
		||||
            value[localname].update(TagGroup(tag, group).is_singleton().attributes())
 | 
			
		||||
            value[localname].update(TagGroup(tag, group).subelement_counts())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue