[Cppunit-devel] setStylesheet on XmlOutputter
Brought to you by:
blep
From: FUKUDA F. <ff...@nt...> - 2002-04-12 06:51:03
|
--- "Re: [Cppunit-devel] encoding of XmlOutputter @1.7.1-alpha" / Baptiste Lepilleur / 2002/02/28 12:58:18 +0100 --- >I've added that feature. >... great! May I ask your favor? one more request for XmlOutputter: >> CppUnit::XmlOutputter prints <?xml...?> at the beginning. >> and it's encoding(charset) is fixed as 'ISO-8859-1' >> however assertion message is NOT always English >> # yes, I am a Japanese :-) >> >> I understand it will be too heavy to support various of encodings. >> so, as alternative: >> >> class XmlOutputter { >> ... >> std::string m_encoding; >> public: >> XmlOutputter( TestResult *result, std::ostream &stream, const char* >encoding="ISO-8859-1" ) >[...] class XmlOutputter { ... string m_stylesheet; public: void setStylesheet(const char* uri) { m_stylesheet = uri; } }; void XmlOutputter::writeProlog() { m_stream << "<?xml version=\"1.0\" " "encoding='" << m_encoding << "' standalone='yes' ?>" << std::endl; // COULD YOU ADD FOLLWING TO SPECIFY THE STYLESHEET? if ( !m_stylesheet.empty() ) { m_stream << "<?xml-stylesheet type=\"text/xsl\" href=\"" << m_stylesheet << "\"?>" << std::endl; } } -----:-----:-----:-----:-----:-----:-----:-----:-----:----- FUKUDA (episteme) Fumiki -- magical, but never a magic... |