Exemple #1
0
    def createProcessingInstruction(self, target, data):
        if not get_name_pattern().match(target):
            raise InvalidCharacterErr()

        #FIXME: Unicode support
        # Technically, chacters from the unicode surrogate blocks are illegal.
        #for c in target:
        #    if c in unicode_surrogate_blocks:
        #        raise InvalidCharacterErr()

        from ProcessingInstruction import ProcessingInstruction
        return ProcessingInstruction(self, target, data)
Exemple #2
0
 def createProcessingInstruction(self, target, data):
     return ProcessingInstruction(self, target, BeautifulSoup.ProcessingInstruction(data))