1. Martin von Löwis
  2. xist-3k

Commits

Walter Dörwald  committed c12ed48

Output the UL4 type ("template") in the header. Bump file version number.

  • Participants
  • Parent commits a6cd211
  • Branches default

Comments (0)

Files changed (1)

File src/ll/ul4c.py

View file
 	Rendering the template can be done with the methods :meth:`render` (which
 	is a generator) or :meth:`renders` (which returns a string).
 	"""
-	version = "11"
+	version = "12"
 
 	def __init__(self):
 		self.startdelim = None
 		version = version.rstrip()
 		if version != self.version:
 			raise ValueError("invalid version, expected %r got, %r" % (self.version, version))
+		type = stream.readline()
+		type = type.rstrip()
+		if type != "template":
+			raise ValueError("invalid type, expected 'template', got %r" % type)
 		self.startdelim = _readstr(u"<")
 		_readcr()
 		self.enddelim = _readstr(u">")
 				yield term
 				yield string
 
-		yield "ul4\n%s\n" % self.version
+		yield "ul4\n%s\ntemplate\n" % self.version
 		for p in _writestr("<", self.startdelim): yield p
 		yield "\n"
 		for p in _writestr(">", self.enddelim): yield p