<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.digitalmedievalist.org/wiki/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Tei:p - Revision history</title>
		<link>http://www.digitalmedievalist.org/wiki/index.php?title=Tei:p&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.5-2squeeze1</generator>
		<lastBuildDate>Sun, 19 May 2013 03:29:42 GMT</lastBuildDate>
		<item>
			<title>DominiqueS:&amp;#32;Created page with &quot;Category:TEI_(Text_Encoding_Initiative) Category:How do I encode...  '''tei:p (paragraph)''' &quot;marks paragraphs in prose&quot; (http://www.tei-c.org/P4X/ref-P.html). For a disc…&quot;</title>
			<link>http://www.digitalmedievalist.org/wiki/index.php?title=Tei:p&amp;diff=102&amp;oldid=prev</link>
			<guid>http://www.digitalmedievalist.org/wiki/index.php?title=Tei:p&amp;diff=102&amp;oldid=prev</guid>
			<description>&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/wiki/index.php/Category:TEI_(Text_Encoding_Initiative)&quot; title=&quot;Category:TEI (Text Encoding Initiative)&quot;&gt;Category:TEI_(Text_Encoding_Initiative)&lt;/a&gt; &lt;a href=&quot;/wiki/index.php/Category:How_do_I_encode...&quot; title=&quot;Category:How do I encode...&quot;&gt;Category:How do I encode...&lt;/a&gt;  &amp;#39;&amp;#39;&amp;#39;tei:p (paragraph)&amp;#39;&amp;#39;&amp;#39; &amp;quot;marks paragraphs in prose&amp;quot; (http://www.tei-c.org/P4X/ref-P.html). For a disc…&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:TEI_(Text_Encoding_Initiative)]]&lt;br /&gt;
[[Category:How do I encode...]]&lt;br /&gt;
&lt;br /&gt;
'''tei:p (paragraph)''' &amp;quot;marks paragraphs in prose&amp;quot; (http://www.tei-c.org/P4X/ref-P.html). For a discussion of how to encode paragraphs in a variety of structural languages, see [[Paragraph]] (part of the [[:Category:How_do_I_encode... | how do I encode...]] [[:Category:DMBinders | Binder]]).&lt;br /&gt;
&lt;br /&gt;
==Subclasses and attributes==&lt;br /&gt;
&lt;br /&gt;
There are no required attributes or subclasses. &amp;lt;code&amp;gt;@type&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;@rend&amp;lt;/code&amp;gt; may be used to distinguish among different types of paragraphs, e.g.&lt;br /&gt;
&lt;br /&gt;
 rend=&amp;quot;first&amp;quot;&lt;br /&gt;
 rend=&amp;quot;warning&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See the [http://www.tei-c.org/P4X/ref-P.html TEI Guidelines] for a discussion of available attributes.&lt;br /&gt;
&lt;br /&gt;
==Style==&lt;br /&gt;
&lt;br /&gt;
Paragraphs may be formatted in a variety of different ways depending on the conventions of the medium and aesthetic sensibility of the text designer. Some common formattings include:&lt;br /&gt;
&lt;br /&gt;
* '''[[Block style]]''' ([http://www.wikipedia.org/wiki/Justification_(typesetting) justified] on one or both sides; first line not indented; 1 line space above and below). This is a common display for text on screen)&lt;br /&gt;
* '''[[Indented style]]''' ([http://www.wikipedia.org/wiki/Justification_(typesetting) justified] on one or both sides; first line indented slightly; no leading or trailing space). This is common in print contexts.&lt;br /&gt;
* '''[[Hanging first line]]''' ([http://www.wikipedia.org/wiki/Justification_(typesetting) justified] on one or both sides; first line extended slightly into the left-margin; with or without no leading or trailing space). This is common in bibliographies.&lt;br /&gt;
&lt;br /&gt;
===CSS===&lt;br /&gt;
&lt;br /&gt;
If you are attempting to display a TEI XML document directly in a commercial browser, the following CSS fragments can be used to style the element:&lt;br /&gt;
&lt;br /&gt;
====Block style====&lt;br /&gt;
&lt;br /&gt;
 p {&lt;br /&gt;
   display:block;&lt;br /&gt;
   margin-top:1em;&lt;br /&gt;
   margin-bottom:1em;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====Indented style====&lt;br /&gt;
&lt;br /&gt;
 p {&lt;br /&gt;
   display:block;&lt;br /&gt;
   margin-top:0;&lt;br /&gt;
   margin-bottom:0;&lt;br /&gt;
   text-indent:1em;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====Hanging first line====&lt;br /&gt;
&lt;br /&gt;
 p {&lt;br /&gt;
   display:block;&lt;br /&gt;
   margin-top:0;&lt;br /&gt;
   margin-bottom:0;&lt;br /&gt;
   text-indent:-1em;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
====Justified left and right margins====&lt;br /&gt;
&lt;br /&gt;
All three of the above fragments will produce [http://www.wikipedia.org/wiki/Justification_(typesetting) right-justified] text (i.e. aligned down the left margin [except for the first line, in the Indented style] with a &amp;quot;ragged&amp;quot; right margin). To [http://www.wikipedia.org/wiki/Justification_(typesetting) justify] both margins, you can add the following line to any style:&lt;br /&gt;
&lt;br /&gt;
 text-align:justify;&lt;br /&gt;
&lt;br /&gt;
===XSLT===&lt;br /&gt;
&lt;br /&gt;
====Conversion to XHTML====&lt;br /&gt;
&lt;br /&gt;
If you are going to convert your TEI paragraph to XHTML, the basic template looks like this&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;xsl:template match=&amp;quot;p&amp;quot;&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;p&amp;amp;gt;&amp;amp;lt;xsl:apply-templates/&amp;amp;gt;&amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/xsl:template&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
As noted in the [[Paragraph | Paragraph article]], however, TEI and (X)HTML have a different model for paragraphs. This becomes an issue with typographically complex paragraphs, particularly those containing internal block quotations, tables, lists, or figures. The specific details of the template used to do this will vary depending on the precise coding of the input XML document. The following example is based on the markup used for articles in the DM journal, where block quotes are encoded as follows (''Lorem ipsum'' from the [http://www.lipsum.com Lorem ipsum generator]):&lt;br /&gt;
&lt;br /&gt;
 '''&amp;amp;lt;p&amp;amp;gt;'''Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;br /&gt;
 Nam id lorem. Nulla velit dolor, pulvinar id, dignissim et, lobortis et, eros.&lt;br /&gt;
 Quisque pretium turpis luctus dui. Praesent dapibus. Nunc tincidunt orci eu arcu.&lt;br /&gt;
 '''&amp;amp;lt;quote&amp;amp;gt;'''&lt;br /&gt;
  '''&amp;amp;lt;p&amp;amp;gt;'''Curabitur mollis, magna eu ultricies sagittis, justo mi&lt;br /&gt;
  commodo tellus, sit amet aliquam pede dui sed nunc. Aenean at eros. Aenean eu&lt;br /&gt;
  quam vel massa laoreet suscipit.'''&amp;amp;lt;/p&amp;amp;gt;'''&lt;br /&gt;
 '''&amp;amp;lt;/quote&amp;amp;gt;'''&lt;br /&gt;
 Nunc arcu quam, congue ac, congue et, ullamcorper a, leo. Maecenas dapibus,&lt;br /&gt;
 sapien non semper semper, neque enim dapibus ligula, in cursus quam dolor sed nunc.&lt;br /&gt;
 Nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.'''&amp;amp;lt;/p&amp;amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Converting this to valid XHTML requires the following the XSLT (version 2.0):&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;xsl:template match=&amp;quot;p&amp;quot;&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;xsl:for-each-group select=&amp;quot;node()&amp;quot;&lt;br /&gt;
                      group-adjacent=&amp;quot;self::quote[p] or self::table or self::list&amp;quot;&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;xsl:choose&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xsl:when test=&amp;quot;current-grouping-key()&amp;quot;&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;xsl:apply-templates select=&amp;quot;current-group()&amp;quot;/&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/xsl:when&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;xsl:otherwise&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;p&amp;amp;gt;&lt;br /&gt;
      &amp;amp;lt;xsl:copy-of select=&amp;quot;current-group()&amp;quot;/&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;/p&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/xsl:otherwise&amp;amp;gt;&lt;br /&gt;
   &amp;amp;lt;/xsl:choose&amp;amp;gt;&lt;br /&gt;
  &amp;amp;lt;/xsl:for-each-group&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/xsl:template&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Based on the example [http://www.w3.org/TR/xslt20/#grouping-examples Grouping Alternating Sequences of Elements] in the [http://www.w3.org/TR/xslt20/ XSLT 2.0 Specification]).&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
The differences between the TEI and XHTML models for paragraph were the subject of an extended discussion on TEI-L, the mailing list of the Text Encoding initiative. To follow the thread, begin with: [http://listserv.brown.edu/archives/cgi-bin/wa?A2=ind0501&amp;amp;L=tei-l&amp;amp;F=&amp;amp;S=&amp;amp;P=20212 http://listserv.brown.edu/archives/cgi-bin/wa?A2=ind0501&amp;amp;amp;L=tei-l&amp;amp;amp;F=&amp;amp;amp;S=&amp;amp;amp;P=20212].&lt;br /&gt;
&lt;br /&gt;
The XSLT method proposed here requires [[XSLT 2.0]]. A partial solution for XSLT 1.0 was posted by Michael Beddow as part of the tei-l thread: [http://listserv.brown.edu/archives/cgi-bin/wa?A2=ind0501&amp;amp;L=tei-l&amp;amp;F=&amp;amp;S=&amp;amp;P=24080 http://listserv.brown.edu/archives/cgi-bin/wa?A2=ind0501&amp;amp;amp;L=tei-l&amp;amp;amp;F=&amp;amp;amp;S=&amp;amp;amp;P=24080].&lt;br /&gt;
&lt;br /&gt;
==Related topics==&lt;br /&gt;
&lt;br /&gt;
* [[:Category:How_do_I_encode... | How do I encode...]]  &lt;br /&gt;
* [[Paragraph]]&lt;/div&gt;</description>
			<pubDate>Sun, 19 Feb 2012 14:46:20 GMT</pubDate>			<dc:creator>DominiqueS</dc:creator>			<comments>http://www.digitalmedievalist.org/wiki/index.php/Talk:Tei:p</comments>		</item>
	</channel>
</rss>