Commits

Walter Dörwald committed 98a1575

Fix regression.

Comments (0)

Files changed (1)

 	def asxnd(self):
 		e = xnd.Attr(unicode(xfind.first(self/name).content), "xsc.TextAttr")
 		isRequired = None
-		node = xfind.first(self/required)
+		node = xfind.first(self/required, None)
 		if node is not None:
 			value = str(node[0].content)
 			if value in ('true', 'yes'):
 	def asxnd(self):
 		e = xnd.Element(unicode(xfind.first(self/name).content))
 		isEmpty = None
-		node = xfind.first(self/bodycontent)
+		node = xfind.first(self/bodycontent, None)
 		if node is not None:
 			value = str(node[0].content)
 			if value in ('tagdependent', 'JSP'):
 			e.modeltype = "sims.Empty"
 		else:
 			e.modeltype = "sims.Any"
-		e.doc = xfind.first(self/info).asxnd()
+		node = xfind.first(self/info, None)
+		if node is not None:
+			e.doc = node.asxnd()
 		for attr in self/attribute:
 			e.attrs.append(attr.asxnd())
 		return e
 
 	def asxnd(self):
 		e = xnd.Namespace(unicode(xfind.first(self/shortname).content))
-		node = xfind.first(self/uri)
+		node = xfind.first(self/uri, None)
 		if node is not None:
 			e.url = unicode(node[0].content)
-		node = xfind.first(self/info)
+		node = xfind.first(self/info, None)
 		if node is not None:
 			e.doc = node[0].asxnd()
 		for node in self/tag: