Boost logo

Boost Users :

Subject: [Boost-users] XML Serialization: Putting Stylesheet tag inside XML file
From: girish hilage (girish_hilage_at_[hidden])
Date: 2010-02-18 10:56:59


Hi,

   Using XML serialization I have created an XML file which I want to see through a browser using a stylesheet.
   So I want to put a statement :
   <?xml-stylesheet type="text/xsl" href="XSLTFile.xsl"?>

   in between below 2 statements :
   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
   <!DOCTYPE boost_serialization>

   like this :
   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
   <?xml-stylesheet type="text/xsl" href="XSLTFile.xsl"?>
   <!DOCTYPE boost_serialization>
   <boost_serialization signature="serialization::archive" version="5">

   But the code for a init() function inside file boost/archive/impl/basic_xml_oarchive.ipp is as follows :

   basic_xml_oarchive<Archive>::init(){
       // xml header
       this->This()->put("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n");
       this->This()->put("<!DOCTYPE boost_serialization>\n");
       // xml document wrapper - outer root
       this->This()->put("<boost_serialization");
       write_attribute("signature", BOOST_ARCHIVE_SIGNATURE());
       write_attribute("version", BOOST_ARCHIVE_VERSION());
       this->This()->put(">\n");
   }

   File XSLTFile.xml contain stylesheet info.
   * So, how is it possible to put a stylesheet related statement just after the 1st statement?
   * Another query is, how to change the the tag name "boost_serialization" to something else?

Regards,
Girish



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net