<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://notiz.blog/wp-content/plugins/pretty-feeds/pretty-feed-v4.xsl" type="text/xsl" media="screen" ?>


<!--

	Feeds whisper secrets,
	In the RSS Club's embrace,
	Knowledge blooms in grace.

-->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:source="http://source.scripting.com/"
xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>X2V &#8211; notizBlog</title>
	<atom:link href="https://notiz.blog/tag/x2v/feed/" rel="self" type="application/rss+xml" />
	<link>https://notiz.blog</link>
	<description>a weblog mainly about the open, portable, interoperable, small, social, synaptic, semantic, structured, distributed, (re-)decentralized, independent, microformatted and federated social web</description>
	<lastBuildDate>Thu, 03 Sep 2020 12:10:15 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://notiz.blog/wp-content/uploads/2019/10/cropped-notizblog-icon-1-32x32.png</url>
	<title>X2V &#8211; notizBlog</title>
	<link>https://notiz.blog</link>
	<width>32</width>
	<height>32</height>
</image> 
<source:blogroll>https://reader.pfefferle.org/i/?a=opml&amp;get=c_2</source:blogroll>
<creativeCommons:license>https://creativecommons.org/licenses/by-sa/4.0/</creativeCommons:license>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://switchboard.p3k.io/"/>
<atom:link rel="self" href="https://notiz.blog/tag/x2v/feed/"/>
<atom:link rel="search" type="application/opensearchdescription+xml" title="Search notizBlog" href="https://notiz.blog/wp-api/opensearch/1.1/document" />	<item>
		<title>Semantic Sugar</title>
		<link>https://notiz.blog/2007/12/04/semantic-sugar/</link>
					<comments>https://notiz.blog/2007/12/04/semantic-sugar/#respond</comments>
		
		<dc:creator><![CDATA[Matthias Pfefferle]]></dc:creator>
		<pubDate>Tue, 04 Dec 2007 07:02:13 +0000</pubDate>
				<category><![CDATA[Webkultur]]></category>
		<category><![CDATA[FediBlog]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Microformats]]></category>
		<category><![CDATA[X2V]]></category>
		<guid isPermaLink="false">http://notizblog.org/2007/12/04/semantic-sugar/</guid>

					<description><![CDATA[Søren Johannessen von Microformats.dk hat auf seinem Weblog ein Exclusiv-Interview mit Brian Suda zum Thema &#8222;Microformats&#8220; geführt. Brian: I like to talk about microformats as “semantic sugar”. Everyone can understand that adding a little bit of sugar to your food you make it taste better. Adding microformats into your HTML makes it “taste” a little [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Søren Johannessen von <a href="https://web.archive.org/web/20080311144406/http://www.microformats.dk/">Microformats.dk</a> hat auf seinem Weblog ein <a href="https://web.archive.org/web/20090407043920/http://www.microformats.dk/2007/11/30/exclusive-interview-with-brian-suda/">Exclusiv-Interview</a> mit <a href="https://suda.co.uk/">Brian Suda</a> zum Thema &#8222;<a href="http://microformats.org">Microformats</a>&#8220; geführt.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
	<p>Brian: I like to talk about microformats as “semantic sugar”. Everyone can understand that adding a little bit of sugar to your food you make it taste better. Adding microformats into your HTML makes it “taste” a little better too!</p>
</blockquote>



<p>Ein weiterer interessanter Artikel von Brian Suda über <a href="http://www.sitepoint.com/article/social-networks-take-friends"><em>Portable Social Networks: Take Your Friends with You</em></a>.</p>
<p>Hey there, RSS reader! You’re cool. Keep being awesome! 😎</p>]]></content:encoded>
					
					<wfw:commentRss>https://notiz.blog/2007/12/04/semantic-sugar/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>X2V with PHP 5</title>
		<link>https://notiz.blog/2007/08/12/x2v-with-php-5/</link>
					<comments>https://notiz.blog/2007/08/12/x2v-with-php-5/#comments</comments>
		
		<dc:creator><![CDATA[Matthias Pfefferle]]></dc:creator>
		<pubDate>Sun, 12 Aug 2007 18:44:31 +0000</pubDate>
				<category><![CDATA[Open Web]]></category>
		<category><![CDATA[hCard]]></category>
		<category><![CDATA[Microformats]]></category>
		<category><![CDATA[vCard]]></category>
		<category><![CDATA[X2V]]></category>
		<guid isPermaLink="false">http://notizblog.org/2007/08/12/x2v-with-php-5/</guid>

					<description><![CDATA[Here are some code snippets to use the gorgeous X2V microformats XSLT files from Brian Suda with PHP 5 and libxslt (PHP 5 includes the XSL extension by default). hCard to vCard: To parse a XML or XHTML document, it has to be valid. To tidy the XML file, you can use a service from [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Here are some code snippets to use the gorgeous <a href="https://suda.co.uk/projects/X2V/">X2V</a> microformats <abbr title="Extensible Stylesheet Language Transformation">XSLT</abbr> files from <a href="https://suda.co.uk/">Brian Suda</a> with PHP 5 and <a href="https://www.php.net/manual/de/book.xsl.php">libxslt</a> (PHP 5 includes the XSL extension by default).</p>



<p><strong>hCard to vCard</strong>:</p>



<p>To parse a XML or XHTML document, it has to be valid. To tidy the XML file, you can use a service from the <a href="http://www.html-tidy.org/">W3C</a>:
</p>


<pre class="wp-block-code"><span><code class="hljs language-php">$xml_string_tidy = file_get_contents(<span class="hljs-string">"http://cgi.w3.org/cgi-bin/tidy?docAddr="</span>.urlencode($uri));</code></span></pre>


<p>Then you have to create the HTML DOM&#8230;
</p>


<pre class="wp-block-code"><span><code class="hljs language-php">@$document = <span class="hljs-keyword">new</span> DOMDocument();
@$document-&gt;loadHTML($xml_string_tidy);</code></span></pre>


<p>and the XSLT DOM&#8230;
</p>


<pre class="wp-block-code"><span><code class="hljs language-php">$stylesheet = <span class="hljs-keyword">new</span> DOMDocument();
$stylesheet-&gt;load(<span class="hljs-string">'hcard2vcard.xsl'</span>);</code></span></pre>


<p>Create a new XSLT Processor, load the Stylesheet&#8230;
</p>


<pre class="wp-block-code"><span><code class="hljs language-php">$processor = <span class="hljs-keyword">new</span> XsltProcessor();
$processor-&gt;importStylesheet($stylesheet);</code></span></pre>


<p>and run the transformation.
</p>


<pre class="wp-block-code"><span><code class="hljs language-php">$result = $processor-&gt;transformToDoc($document);
$str = $result-&gt;saveXML();</code></span></pre>


<p>Now <code>$str</code> contains the transformed code.<br/> To send the vCard header with PHP, try</p>


<pre class="wp-block-code"><span><code class="hljs language-php">header(<span class="hljs-string">"Content-Disposition: attachment; filename=contact.vcf"</span>);
header(<span class="hljs-string">"Content-Type: text/x-vcard; charset=UTF-8 name=contact.vcf"</span>);
<span class="hljs-keyword">echo</span> $str;</code></span></pre>


<p>If you want to use the vCard extension .vcf instead of .php you have to add something like that to your <code>.htaccess</code> file</p>


<pre class="wp-block-code"><span><code class="hljs">RewriteEngine On
RewriteBase /
RewriteRule ^contact.vcf /hcard2vcard.php &#91;L,QSA]</code></span></pre>


<p>I hope it works 🙂</p>
<p>RSS readers like you are the unsung heroes of the internet. Keep up the good work!</p>]]></content:encoded>
					
					<wfw:commentRss>https://notiz.blog/2007/08/12/x2v-with-php-5/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
