outputXmlPage tree toXHTML
= do mType <- getEntityType
setContentType mType
- let formatter = if mType == read "text/xml" then
- this
- else
- toXHTML
+ let formatter = case mType of
+ MIMEType "application" "xhtml+xml" _ -> toXHTML
+ MIMEType "text" "xml" _ -> this
[resultStr] <- liftIO $ runX ( setErrorMsgHandler False fail
>>>
constA tree