ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FeepingCreaturism/Jargon.cpp
(Generate patch)

Comparing FeepingCreaturism/Jargon.cpp (file contents):
Revision 208 by Douglas Thrift, 2004-09-02T03:31:43-07:00 vs.
Revision 222 by Douglas Thrift, 2004-09-05T22:52:35-07:00

# Line 22 | Line 22 | Jargon::Jargon(const ext::String& path,
22          word = *jargon/"word";
23          pronunciation = *jargon/"pronunciation";
24          grammar = *jargon/"grammar";
25 <        definition = *jargon/"definition";
25 >        definition = *jargon/"definition"/"p";
26   }
27  
28   void Jargon::display(ios::PrintWriter& pout, xml::TextWriter& xhtml) const
# Line 33 | Line 33 | void Jargon::display(ios::PrintWriter& p
33                  xhtml.OpenElement("strong");
34                  xhtml.OutputText(word + ":");
35                  xhtml.CloseElement();
36                xhtml.OutputText(" " + pronunciation);
36  
37 <                if (!grammar.IsEmpty()) xhtml.OutputText(", " + grammar);
37 >                if (!pronunciation.IsEmpty()) xhtml.OutputText(" " + pronunciation);
38 >                if (!pronunciation.IsEmpty() && !grammar.IsEmpty()) xhtml.OutputText(",");
39 >                if (!grammar.IsEmpty()) xhtml.OutputText(" " + grammar);
40          }
41  
42 <        for (xml::NodeSet::ConstIterator node(definition.Begin());
42 <                node != definition.End(); ++node)
43 <        {
44 <                xml::ScopeElement p(xhtml, "p");
45 <
46 <                xhtml.OutputText(**node/"p");
47 <        }
42 >        definition.WriteTo(xhtml);
43   }
44  
45   struct Section
# Line 59 | Line 54 | ios::PrintWriter& operator<<(ios::PrintW
54   {
55          if (jargon.include)
56          {
57 <                xml::TextWriter xhtml(pout);
57 >                xml::TextWriter xhtml(pout, true);
58  
59                  jargon.display(pout, xhtml);
60  
# Line 69 | Line 64 | ios::PrintWriter& operator<<(ios::PrintW
64          pout << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"
65                  << "\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
66  
67 <        xml::TextWriter xhtml(pout);
67 >        xml::TextWriter xhtml(pout, true);
68          xml::ScopeElement html(xhtml, "html");
69  
70          xhtml.SetAttribute("xmlns", "http://www.w3.org/1999/xhtml");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines