I was wondering, what input type is the least difficult for Prince to handle? Since I have the luxury of generating my own html/xml before giving it to Prince, and speed is important, should I give Prince regular HTML (read: valid 4.x), xhtml (transitional ok or strict better?), or a well-formed XML dialect of my own design?
Many thanks for any suggestions.
There isn't much difference in speed between parsing XML and HTML, so the choice comes down to error-handling behaviour. For example, Prince will reject an XML document that contains an unescaped ampersand, commonly found in href attributes pointing to CGI scripts, while in a HTML document Prince will keep going and load it anyway. If recovering from potentially lossy input is important, go with HTML, whereas if strictness is important, or you are having character-encoding issues, go with XML. (The DOCTYPE doesn't matter, although if you leave Prince to guess the input it may choose to parse the document as XML if it sees an XHTML DOCTYPE).