Created
April 30, 2011 08:47
-
-
Save mingan/949537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
width: 210mm; | |
margin: 1em auto; | |
font-family: Verdana, Arial, sans-serif; | |
} | |
h1 { | |
text-align: center; | |
margin-bottom: .4cm; | |
font-size: 1.7em; | |
} | |
img { | |
float: left; | |
display: block; | |
border: .7mm solid #000; | |
margin-right: .4cm; | |
margin-left: 1cm; | |
width: 58px; | |
} | |
.kontakt { | |
width: 7.4cm; | |
float: left; | |
clear: right; | |
} | |
.telefon, .email { | |
margin-top: .2cm; | |
padding-left: .7cm; | |
} | |
.telefon { | |
background: url('telephone.png') left center no-repeat; | |
} | |
.telefon span { | |
display: block; | |
} | |
.email { | |
background: url('email.png') left center no-repeat; | |
} | |
.konzHodiny { | |
float: left; | |
clear: right; | |
width: 10.5cm; | |
} | |
h2 { | |
font-size: 100%; | |
margin-top: .2em; | |
margin-bottom: 0; | |
} | |
.platnostVizitek { | |
display: block; | |
font-style: italic; | |
font-size: 80%; | |
margin-bottom: .3cm; | |
} | |
table { | |
margin: 0 0 .3cm 0; | |
border: none; | |
width: 80%; | |
} | |
th { | |
width: 35%; | |
padding-right: .2cm; | |
text-align: left; | |
font-weight: normal; | |
} | |
td { | |
width: 65%; | |
padding-left: .2cm; | |
} | |
.poznamka { | |
clear: both; | |
font-size: 90%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:fph="http://fph.vse.cz" | |
version="1.0"> | |
<xsl:output method="xhtml" encoding="utf-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" xml:lang="cs"/> | |
<xsl:param name="kancelar">RB 445</xsl:param> | |
<xsl:param name="platnostVizitek">14. 2. - 13. 5. 2011</xsl:param> | |
<xsl:template match="/"> | |
<html> | |
<head> | |
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | |
<link rel="stylesheet" type="text/css" href="nahledy.css"/> | |
<title>Náhled vizitek pro kancelář <xsl:value-of select="$kancelar"/></title> | |
</head> | |
<body> | |
<xsl:apply-templates/> | |
</body> | |
</html> | |
</xsl:template> | |
<xsl:template match="fph:zaměstnanec"> | |
<xsl:if test="fph:kancelář/text()=$kancelar"> | |
<div> | |
<h1><xsl:value-of select="fph:jméno"/></h1> | |
<img src="{substring-before(fph:email,'@')}.jpg" height="70" /> | |
<div class="kontakt"> | |
<div class="telefon"> | |
<xsl:for-each select="fph:telefon"> | |
<span><xsl:value-of select="."/></span> | |
</xsl:for-each> | |
</div> | |
<div class="email"> | |
<xsl:value-of select="fph:email"/> | |
</div> | |
</div> | |
<xsl:apply-templates/> | |
</div> | |
</xsl:if> | |
</xsl:template> | |
<xsl:template match="fph:konzultační_hodiny"> | |
<div class="konzHodiny"> | |
<h2>Konzultační hodiny</h2> | |
<span class="platnostVizitek">(<xsl:value-of select="$platnostVizitek"/>)</span> | |
<table> | |
<tbody> | |
<xsl:for-each select="fph:den"> | |
<tr> | |
<th rowspan="{count(fph:čas)}"><xsl:value-of select="@dentýdne"/></th> | |
<td><xsl:value-of select="fph:čas[1]"/></td> | |
</tr> | |
<xsl:if test="count(fph:čas) > 1"> | |
<xsl:for-each select="fph:čas[position()>1]"> | |
<tr> | |
<td><xsl:value-of select="."/></td> | |
</tr> | |
</xsl:for-each> | |
</xsl:if> | |
</xsl:for-each> | |
</tbody> | |
</table> | |
</div> | |
</xsl:template> | |
<xsl:template match="fph:poznámka"> | |
<p class="poznamka"><xsl:value-of select="."/></p> | |
</xsl:template> | |
<xsl:template match="text()"/> | |
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\+420( \d{3}){3} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:fo="http://www.w3.org/1999/XSL/Format" | |
xmlns:fph="http://fph.vse.cz" | |
version="1.0"> | |
<xsl:output method="xml" encoding="UTF-8"/> | |
<xsl:param name="kancelar">RB 445</xsl:param> | |
<xsl:param name="platnostVizitek">14. 2. - 13. 5. 2011</xsl:param> | |
<xsl:template match="/"> | |
<fo:root> | |
<fo:layout-master-set> | |
<fo:simple-page-master master-name="vizitka" page-width="210mm" page-height="297mm"> | |
<fo:region-body/> | |
</fo:simple-page-master> | |
</fo:layout-master-set> | |
<fo:page-sequence master-reference="vizitka"> | |
<fo:flow flow-name="xsl-region-body"> | |
<xsl:apply-templates/> | |
</fo:flow> | |
</fo:page-sequence> | |
</fo:root> | |
</xsl:template> | |
<xsl:template match="fph:zaměstnanec"> | |
<xsl:if test="fph:kancelář/text()=$kancelar"> | |
<fo:block> | |
<fo:block><xsl:value-of select="fph:jméno"/></fo:block> | |
<fo:external-graphic src="url({substring-before(fph:email,'@')}.jpg)" height="70px" /> | |
<fo:block> | |
<xsl:for-each select="fph:telefon"> | |
<fo:block><xsl:value-of select="."/></fo:block> | |
</xsl:for-each> | |
</fo:block> | |
<fo:block> | |
<xsl:value-of select="fph:email"/> | |
</fo:block> | |
<xsl:apply-templates/> | |
</fo:block> | |
</xsl:if> | |
</xsl:template> | |
<xsl:template match="fph:konzultační_hodiny"> | |
<fo:block>Konzultační hodiny</fo:block> | |
<fo:block><xsl:text>(</xsl:text><xsl:value-of select="$platnostVizitek"/><xsl:text>)</xsl:text></fo:block> | |
<fo:table> | |
<fo:table-column column-width="35%"/> | |
<fo:table-column column-width="65%"/> | |
<fo:table-body> | |
<xsl:for-each select="fph:den"> | |
<fo:table-row> | |
<fo:table-cell number-rows-spanned="{count(fph:čas)}"><fo:block><xsl:value-of select="@dentýdne"/></fo:block></fo:table-cell> | |
<fo:table-cell><fo:block><xsl:value-of select="fph:čas[1]"/></fo:block></fo:table-cell> | |
</fo:table-row> | |
<xsl:if test="count(fph:čas) > 1"> | |
<xsl:for-each select="fph:čas[position()>1]"> | |
<fo:table-row> | |
<fo:table-cell><fo:block><xsl:value-of select="."/></fo:block></fo:table-cell> | |
</fo:table-row> | |
</xsl:for-each> | |
</xsl:if> | |
</xsl:for-each> | |
</fo:table-body> | |
</fo:table> | |
</xsl:template> | |
<xsl:template match="fph:poznámka"> | |
<fo:block><xsl:value-of select="."/></fo:block> | |
</xsl:template> | |
<xsl:template match="text()"/> | |
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<zaměstnanci xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="zamestnanci.xsd" | |
xmlns="http://fph.vse.cz"> | |
<zaměstnanec> | |
<kancelář>RB 420</kancelář> | |
<jméno>Ing. Milan Novák</jméno> | |
<telefon>+420 224 098 720</telefon> | |
<email>novakmil@vse.cz</email> | |
<konzultační_hodiny> | |
<den dentýdne="pondělí"> | |
<čas> | |
9:00-10:00 | |
</čas> | |
<čas> | |
14:15-16:00 | |
</čas> | |
</den> | |
<den dentýdne="úterý"> | |
<čas>14:00-16:00</čas> | |
</den> | |
</konzultační_hodiny> | |
<poznámka> | |
Konzultační hodiny také možné po dmoluvě s vyučujícím | |
</poznámka> | |
</zaměstnanec> | |
<zaměstnanec> | |
<kancelář>RB 325</kancelář> | |
<kancelář>RB 445</kancelář> | |
<jméno>doc. Ing. Jiří Hnilica, Ph.D.</jméno> | |
<telefon>+420 224 098 445</telefon> | |
<telefon>+420 224 098 325</telefon> | |
<email>jiri.hnilica@vse.cz</email> | |
<konzultační_hodiny> | |
<den dentýdne="úterý"> | |
<čas>14:00-16:00</čas> | |
</den> | |
<den dentýdne="středa"> | |
<čas>14:00-16:00</čas> | |
</den> | |
</konzultační_hodiny> | |
<poznámka>office hours only for CEMS International Management programme: Tuesdays 16:00-17:00 RB325 / exklusivita pro CEMS neplatí 29.3.2011, CEMS exclusivity not applicable on 29 March 2011</poznámka> | |
</zaměstnanec> | |
<zaměstnanec> | |
<kancelář>RB 445</kancelář> | |
<jméno>Ing. Hana Svobodová, Ph.D.</jméno> | |
<telefon>+420 224 098 420</telefon> | |
<email>svobha@vse.cz</email> | |
<konzultační_hodiny> | |
<den dentýdne="středa"> | |
<čas>8:00-9:00</čas> | |
</den> | |
<den dentýdne="čtvrtek"> | |
<čas>8:15-9:15</čas> | |
</den> | |
</konzultační_hodiny> | |
</zaměstnanec> | |
</zaměstnanci> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" | |
targetNamespace="http://fph.vse.cz" | |
xmlns="http://fph.vse.cz"> | |
<xs:element name="zaměstnanci"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="zaměstnanec" type="zaměstnanecType" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:unique name="unikatni_email"> | |
<xs:selector xpath="zaměstnanec"/> | |
<xs:field xpath="email"/> | |
</xs:unique> | |
</xs:element> | |
<xs:complexType name="zaměstnanecType"> | |
<xs:sequence> | |
<xs:element name="kancelář" type="kancelářType" maxOccurs="3"/> | |
<xs:element name="jméno" type="jménoType"/> | |
<xs:element name="telefon" type="telefonType" maxOccurs="3"/> | |
<xs:element name="email" type="emailType"/> | |
<xs:element name="konzultační_hodiny" type="konzultaceType"> | |
<xs:unique name="konzultacni_hodiny_kazdy_jenom_jednou"> | |
<xs:selector xpath="den"/> | |
<xs:field xpath="@dentýdne"/> | |
</xs:unique> | |
</xs:element> | |
<xs:element name="poznámka" type="poznámkaType" minOccurs="0"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:simpleType name="kancelářType"> | |
<xs:restriction base="xs:string"/> | |
</xs:simpleType> | |
<xs:simpleType name="jménoType"> | |
<xs:restriction base="xs:string"/> | |
</xs:simpleType> | |
<xs:simpleType name="telefonType"> | |
<xs:restriction base="xs:string"> | |
<xs:pattern value="\+420( \d{3}){3}"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:simpleType name="emailType"> | |
<xs:restriction base="xs:string"> | |
<xs:pattern value="[a-zA_Z0-9][a-zA-Z0-9.-_]+@vse\.cz"/> | |
</xs:restriction> | |
</xs:simpleType> | |
<xs:complexType name="konzultaceType"> | |
<xs:sequence> | |
<xs:element name="den" type="denType" maxOccurs="7"/> | |
</xs:sequence> | |
</xs:complexType> | |
<xs:complexType name="denType"> | |
<xs:sequence> | |
<xs:element name="čas" type="časType" maxOccurs="3"/> | |
</xs:sequence> | |
<xs:attribute name="dentýdne" use="required" type="dentýdneType"/> | |
</xs:complexType> | |
<xs:simpleType name="časType"> | |
<xs:restriction base="xs:string"/> | |
</xs:simpleType> | |
<xs:simpleType name="poznámkaType"> | |
<xs:restriction base="xs:string"/> | |
</xs:simpleType> | |
<xs:simpleType name="dentýdneType"> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="pondělí"/> | |
<xs:enumeration value="úterý"/> | |
<xs:enumeration value="středa"/> | |
<xs:enumeration value="čtvrtek"/> | |
<xs:enumeration value="pátek"/> | |
</xs:restriction> | |
</xs:simpleType> | |
</xs:schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment