I am searching for two days but just one solution VectorConvetor and it doesn't seem to work. Actually am using excanvas for InternetExplorer and want to save that image to png. IE gives VML and am not able to convert it to a png using PHP. I have heard about rendering the VML to IE and taking a screenshot using PHP but haven't found a satisfying solution to that too.
Use vml2svg.xsl and its dependencies as the imported stylesheet of an object which calls transformToXML to convert VML to SVG, then convert SVG to PNG using readImageBlob and imagemagick:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/2000/svg"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<!-- INDEX:
* template:
- vml-shape
* match:
- /
- v:group
- v:shape
-->
<!-- XXXXXXXXXXXXXXXX VARIABILI GLOBALI XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:variable name="n-elementi">
<xsl:value-of select="count(//*)" />
</xsl:variable>
<!-- Queste variabili rappresentano una dimensione "standard" in pixel della parte di
schermo usabile per rappresentare l'immagine (escludendo la porzione occupata dalla
barra dei browser), per schermi di 17 pollici, con risoluzione 800x600.
Si usano come approssimazione quando un immagine non specifica la
sua dimensioni oppure è espressa tramite percentuale.
-->
<xsl:variable name="schermo-x">
<xsl:text>750</xsl:text>
</xsl:variable>
<xsl:variable name="schermo-y">
<xsl:text>400</xsl:text>
</xsl:variable>
<!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<!-- ********************************************************************************* -->
<!-- ********************************* RADICE **************************************** -->
<!-- ********************************************************************************* -->
<xsl:template match="/">
<!-- creo un elemento svg contenitore, che non influenza nessun altra misura, serve solo
da contenitore, in quanto svg ha bisogno di un elemento radice.
Inoltre questo elemento conterrà un elemento defs con tutti i riferimenti contenuti
nel documento.
-->
<svg preserveAspectRatio="none"
overflow="visible">
<!-- NB: da aggiungere un choose per vml non contenuti in un documento html -->
<xsl:for-each select="//html:BODY | //html:body">
<!-- gestione di defs -->
<defs>
<xsl:call-template name="gestione-textpath" />
<xsl:call-template name="gestione-gradient" />
<xsl:call-template name="gestione-pattern" />
</defs>
<xsl:apply-templates />
</xsl:for-each>
</svg>
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO GROUP ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template match="v:group">
<!-- per ogni gruppo trovaro creo un elemento svg -->
<svg>
<xsl:call-template name="core-attrs" />
<xsl:call-template name="attributo-viewbox" />
<!-- svg di default fa clipping, vml non lo fa, quindi devo impostare un attributo
per segnalare di far vedere il contenuto fuori dai margini
-->
<xsl:attribute name="overflow"><xsl:text>visible</xsl:text></xsl:attribute>
<xsl:call-template name="attributo-title" />
<!-- controllo un eventuale presenza di rotazioni -->
<xsl:variable name="r">
<xsl:call-template name="attributo-rotation" />
</xsl:variable>
<xsl:variable name="v-coordsize">
<xsl:call-template name="valore-coordsize" />
</xsl:variable>
<xsl:variable name="vb_x">
<xsl:value-of select="substring-before(normalize-space($v-coordsize),' ')" />
</xsl:variable>
<xsl:variable name="vb_y">
<xsl:value-of select="substring-after(normalize-space($v-coordsize),' ')" />
</xsl:variable>
<xsl:choose>
<!-- se ho una rotazione nell'elemento group, creo un gruppo per gestire
questa rotazione, posizionandomi nel centro della figura, perchè
svg e vml gestiscono in modo diverso le rotazioni: il primo
rispetto al punto in alto a sinistra (salvo diversa disposizione)
e l'altro rispetto al centro.
-->
<xsl:when test="$r != '0'">
<g>
<xsl:attribute name="transform">
<xsl:text>rotate(</xsl:text>
<xsl:value-of select="$r" />
<xsl:text>, </xsl:text>
<xsl:value-of select="($vb_x div 2)" />
<xsl:text>, </xsl:text>
<xsl:value-of select="($vb_y div 2)" />
<xsl:text>)</xsl:text>
</xsl:attribute>
<xsl:apply-templates />
</g>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</svg>
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO SHAPE ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template match="v:shape">
<!-- per ogni elemento shape creo un elemento svg, impostando opportunamente gli attributi
e gestendo/creando gli altri elementi per rappresentare eventuali path, testi o
immagini esterno (in quanto questi elementi sono esclusivamente contenuti in shape).
Vengono gestiti inoltre eventuali riferimenti a shapetype, considerando gli
attributi sia di quest'elemento shape, sia dei shapetype riferiti, poi si
impostano i valori dando precedenza agli attributi di shape, poi vengono quelli di
shapetype, altrimenti si usano i valori di default o quelli ereditati
-->
<!-- cerco un eventuale riferimento a un elemento shapetype -->
<xsl:variable name="id-of-shapetype">
<xsl:value-of select="substring-after(#type,'#')" />
</xsl:variable>
<!-- cerco un eventuale riferimento ad un immagine, contenuto o in questo elemento
shape o in elementi shapetype riferiti
-->
<xsl:variable name="image_present">
<xsl:choose>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:imagedata)
or (v:imagedata)" ><xsl:text>yes</xsl:text></xsl:when>
<xsl:otherwise><xsl:text></xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- contiene yes o stringa vuota a seconda che debba o meno effettuare un riempimento:
la scelta è dovuta alla presenza di un immagine o all'impostazione di un attributo
per segnalare di non effettuare il riempiemento (fillok dell'elemento path)
-->
<xsl:variable name="no-fill">
<xsl:choose>
<xsl:when test="$image_present = 'yes'">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:when test="v:path[#fillok = 'true']">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="v:path[#fillok = 'false']">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#fillok = 'true'])">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#fillok = 'false'])">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- segnala se devo disegnare i bordi, determinato dal valore dell'attributo strokeok, presente
in elementi path, figli di shape o di shapetype riferiti
-->
<xsl:variable name="no-stroke">
<xsl:choose>
<xsl:when test="v:path[#strokeok = 'true']">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="v:path[#strokeok = 'false']">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#strokeok = 'true'])">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="(//v:shapetype[#id = $id-of-shapetype]/v:path[#strokeok = 'false'])">
<xsl:text>yes</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- creo l'elemento svg -->
<svg>
<xsl:call-template name="core-attrs" />
<!-- imposto coordsize (viewbox di svg):
prima lo cerco nell'elemento shape e se c'è lo imposto,
poi lo cerco in shapetype ed eventualmente lo imposto,
altrimenti cerco negli elementi ancestor
-->
<xsl:choose>
<xsl:when test="#coordsize">
<xsl:call-template name="attributo-viewbox" />
</xsl:when>
<xsl:when test="//v:shapetype[#id = $id-of-shapetype]">
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]">
<xsl:call-template name="attributo-viewbox" />
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="attributo-viewbox" />
</xsl:otherwise>
</xsl:choose>
<!-- imposto le proprietà di fill e stroke:
- prima le cerco in eventuali shapetype e imposto gli
attributi;
- poi le cerco in shape, creando gli attributi che
sovrascriveranno quelli impostati in precedenza e
specifico (parametro default = no) che nel caso non
vengano trovate le proprietà non si devono impostare
i valori di default, altrimenti questi sovrascriverebbero
i valori impostati con shapetype (da notare che se una
proprietà non è presente ne in shape che in shapetype,
quando cerco i valori in st, non trovandoli vengono
impostati con i valori di default e la successiva
ricerca in shape li lascerà inalterati.
-->
<xsl:choose>
<xsl:when test="//v:shapetype[#id = $id-of-shapetype]">
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]">
<xsl:call-template name="attributi-paint">
<xsl:with-param name="no-fill">
<xsl:value-of select="$image_present" />
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:call-template name="attributi-paint">
<xsl:with-param name="default">
<xsl:text>no</xsl:text>
</xsl:with-param>
<xsl:with-param name="no-fill">
<xsl:value-of select="$no-fill" />
</xsl:with-param>
<xsl:with-param name="no-stroke">
<xsl:value-of select="$no-stroke" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="attributi-paint">
<xsl:with-param name="no-fill">
<xsl:value-of select="$no-fill" />
</xsl:with-param>
<xsl:with-param name="no-stroke">
<xsl:value-of select="$no-stroke" />
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<!-- vml non presenta questa proprietà, tuttavia il comportamento
di vml equivale in svg alla proprietà impostata con evenodd,
mentre svg per default ha questa proprietà impostata a nonzero
-->
<xsl:attribute name="fill-rule">
<xsl:text>evenodd</xsl:text>
</xsl:attribute>
<xsl:call-template name="attributo-title" />
<xsl:variable name="r">
<xsl:call-template name="attributo-rotation" />
</xsl:variable>
<!-- gestisco il contenuto di shape, controllando l'eventuale
presenza di rotazioni (in caso affermativo creo un
gruppo con trasform, posizionandolo opportunamente), poi
cerco eventuali link associati alla figura, tramite il template
gestione-href, il quale in caso di link, creerà un elemento a e
chiamarà un template per gestire il contenuto di shape (vml-shape).
In caso non siano presenti link verrà chiamato ugualmente il
template vml-shape (senza creare l'elemento a).
-->
<xsl:choose>
<xsl:when test="$r != '0'">
<g>
<!-- devo calcolare questi valori per spostare l'asse
di rotazione: dall'angolo in alto a sx (comportamento
di default di svg) al centro della regione.
-->
<xsl:variable name="cs-w">
<xsl:call-template name="valore-coordsize">
<xsl:with-param name="parametro"><xsl:text>w</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="cs-h">
<xsl:call-template name="valore-coordsize">
<xsl:with-param name="parametro"><xsl:text>h</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:attribute name="transform">
<xsl:text>rotate(</xsl:text>
<xsl:value-of select="$r" />
<xsl:text>, </xsl:text>
<xsl:value-of select="($cs-w div 2)" /> <!-- $x + .. -->
<xsl:text>, </xsl:text>
<xsl:value-of select="($cs-h div 2)" />
<xsl:text>)</xsl:text>
</xsl:attribute>
<xsl:call-template name="gestione-href">
<xsl:with-param name="nome-template">
<xsl:text>vml-shape</xsl:text>
</xsl:with-param>
</xsl:call-template>
</g>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="gestione-href">
<xsl:with-param name="nome-template">
<xsl:text>vml-shape</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</svg>
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ***************************** VML SHAPE ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template name="vml-shape">
<xsl:variable name="id-of-shapetype">
<xsl:value-of select="substring-after(#type,'#')" />
</xsl:variable>
<!-- valore di coordsize(w) / w di tutti gli elementi ancestor: rappresenta la dimensione
di un user unit.
-->
<xsl:variable name="aggiustamento">
<xsl:for-each select="v:*">
<xsl:if test="position() = last()">
<xsl:call-template name="calcola-scala" />
</xsl:if>
</xsl:for-each>
</xsl:variable>
<!-- XXXXXXXXXXXXXX GESTIONE IMAGEDATA XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]/v:imagedata">
<xsl:call-template name="elemento-imagedata" />
</xsl:for-each>
<xsl:for-each select="v:imagedata">
<xsl:call-template name="elemento-imagedata" />
</xsl:for-each>
<!-- XXXXXXXXXXXXXX GESTIONE PATH - TEXTPATH XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:choose>
<!-- devo rappresentare textpath -->
<xsl:when test="((v:path[#textpathok = 'true' or #textpathok = 't']) or
(//v:shapetype[#id = $id-of-shapetype]/v:path
[#textpathok = 'true' or #textpathok = 't'])) and
((v:textpath) or
(//v:shapetype[#id = $id-of-shapetype]/v:textpath))">
<xsl:choose>
<xsl:when test="v:textpath[#string]">
<xsl:for-each select="v:textpath[#string]">
<xsl:if test="position() = last()">
<xsl:call-template name="elemento-textpath" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="v:textpath">
<xsl:variable name="stringa-st">
<xsl:for-each select="
//v:shapetype[#id = $id-of-shapetype]/
v:textpath[#string]">
<xsl:if test="position() = last()">
<xsl:value-of select="#string" />
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="v:textpath">
<xsl:if test="position() = last()">
<xsl:call-template name="elemento-textpath" >
<xsl:with-param name="stringa">
<xsl:value-of select="$stringa-st" />
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="//v:shapetype[#id = $id-of-shapetype]/v:textpath">
<xsl:variable name="path-id">
<xsl:choose>
<xsl:when test="v:path[#v != ''] or #path != ''">
<xsl:value-of select="count(preceding::v:*) +
count(ancestor::v:*)" />
</xsl:when>
<xsl:otherwise>
<xsl:text></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="
//v:shapetype[#id = $id-of-shapetype]/v:textpath">
<xsl:if test="position() = last()">
<xsl:choose>
<xsl:when test="$path-id = ''">
<xsl:call-template name="elemento-textpath">
<xsl:with-param name="aggiustamento">
<xsl:value-of select="$aggiustamento" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="elemento-textpath" >
<xsl:with-param name="path-id">
<xsl:value-of select="$path-id" />
</xsl:with-param>
<xsl:with-param name="aggiustamento">
<xsl:value-of select="$aggiustamento" />
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise><!-- in teoria qui non dovrebbe andarci mai -->
<XXX></XXX>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- devo rappresentare path -->
<xsl:when test="v:path[#v != '']">
<xsl:for-each select="v:path[#v != '']">
<xsl:if test="position() = last()">
<xsl:call-template name="gestione-path" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="#path != ''">
<xsl:call-template name="elemento-path">
<xsl:with-param name="v">
<xsl:value-of select="#path" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="//v:shapetype[#id = $id-of-shapetype]">
<xsl:choose>
<xsl:when test="v:path[#v != '']">
<xsl:for-each select="v:path[#v != '']">
<xsl:if test="position() = last()">
<xsl:call-template name="gestione-path" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="#path != ''">
<xsl:call-template name="elemento-path">
<xsl:with-param name="v">
<xsl:value-of select="#path" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
<!-- XXXXXXXXXXXXXXXXXXX GESTIONE TEXTBOX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
<xsl:if test="(v:textbox)">
<xsl:call-template name="elemento-textbox">
<xsl:with-param name="id-of-shapetype">
<xsl:value-of select="$id-of-shapetype" />
</xsl:with-param>
<xsl:with-param name="aggiustamento">
<xsl:value-of select="$aggiustamento" />
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates />
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO SHAPETYPE ************************************* -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template name="elemento-shapetype">
<!-- shapetype viene gestito quando e' richiamato da shape -->
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ TEMPLATE GESTIONE-SHAPETYPE **************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template name="gestione-shapetype">
<!-- shapetype viene gestito quando e' richiamato da shape -->
</xsl:template>
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<!-- ************************ ELEMENTO A ***************************************** -->
<!-- ********************************************************************************* -->
<!-- ********************************************************************************* -->
<xsl:template match="html:a">
<xsl:choose>
<xsl:when test="#href">
<a>
<xsl:attribute name="xlink:href">
<xsl:value-of select="#href" />
</xsl:attribute>
<xsl:apply-templates />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 days ago.
This post was edited and submitted for review 7 days ago.
Improve this question
I have a small php script that read an xml file and build a tree structure list.
but i need it to build it another way.
each 'SO' is a group and some of them have an 'id' attribute and some og them have a 'PID' with a value
i want the tree to be build on this, if the 'PID' value matches a 'SO' id attribute then the SO must be a brench of that 'SO'.
xml example:
<?xml version="1.0" encoding="utf-8"?>
<Database Id="fb05">
<Header>
<RegionId>1000</RegionId>
<ChildRegionId>2</ChildRegionId>
<FileCreator>PC</FileCreator>
<AssemblyVersion>1.19.0.8076</AssemblyVersion>
<FileOwner>kodak</FileOwner>
<DatabaseVersion>-1--1</DatabaseVersion>
<LastUsedDatabaseVersion>-1--1</LastUsedDatabaseVersion>
<LastSavedDate>07.02.2023 17:45:32</LastSavedDate>
</Header>
<Data>
<SO Id="P8736ae982b4f40aca2d6d9e64f989f59">
<OID>0</OID>
<N>Node</N>
<PID>-1</PID>
<Ms />
</SO>
<SO Id="P63d414fdaf8c414ab2bcc82314e94eb1">
<N>45.1</N>
<PID>P8736ae982b4f40aca2d6d9e64f989f59</PID>
<OID>1</OID>
<Ms />
<Ps>
<P Id="65">
<V>45.1</V>
</P>
</Ps>
</SO>
<SO Id="P1aab4a4b96664cd5a8c579b85b55c775">
<OID>2</OID>
<N>Tavle Navn 1</N>
<PID>P63d414fdaf8c414ab2bcc82314e94eb1</PID>
<Ps>
<P Id="71">
<V>Tavle Navn 1</V>
</P>
<P Id="3">
<V>TN-S</V>
</P>
<P Id="72">
<V>Isolationtest BMS-KT.45.6A.-1.01</V>
</P>
</Ps>
<Ms>
<M Id="P7bd80659b03c44d4887695db676157a0">
<MID>4</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:30:31</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="4">
<V>500 V</V>
</MP>
<MP Id="11">
<V>-</V>
</MP>
</MPs>
<Ls>
<L Id="1">
<V>1 MOhm</V>
</L>
</Ls>
<Rs>
<R Id="9">
<V>>999MOhm</V>
<S>1</S>
</R>
<R Id="10">
<V>525V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
</Ms>
</SO>
<SO Id="Pdef14a1c6ecb490795743ed9c7a5c6bb">
<OID>9</OID>
<N>F1</N>
<PID>P1aab4a4b96664cd5a8c579b85b55c775</PID>
<Ps>
<P Id="96">
<V>F1</V>
</P>
<P Id="109">
<V>IEC/EN</V>
</P>
<P Id="111">
<V>100 A</V>
</P>
<P Id="110">
<V>10 A</V>
</P>
<P Id="105">
<V>0.4 s</V>
</P>
<P Id="108">
<V>C</V>
</P>
<P Id="114">
<V>30 mA</V>
</P>
<P Id="113">
<V>A</V>
</P>
<P Id="95">
<V>Kredsløb nr</V>
</P>
<P Id="97">
<V>Beskrivelse af kreds sikring</V>
</P>
<P Id="98">
<V>Kreds lokation</V>
</P>
<P Id="625" />
<P Id="103" />
<P Id="102" />
<P Id="100" />
<P Id="99" />
</Ps>
<Ms>
<M Id="Pe1c73a71b6f8426794f3a9755fc43001">
<MID>7</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:41:28</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="56">
<V>LPE</V>
</MP>
<MP Id="152">
<V>Rpe</V>
</MP>
<MP Id="338">
<V>standard</V>
</MP>
</MPs>
<Ls>
<L Id="3">
<V>2 Ohm</V>
</L>
</Ls>
<Rs>
<R Id="21">
<V>0.02Ohm</V>
<S>1</S>
</R>
<R Id="22">
<V>0.0Ohm</V>
<S>0</S>
</R>
<R Id="23">
<V>0.0Ohm</V>
<S>0</S>
</R>
<R Id="26">
<V>Yes</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="P6528dcb9c4c04ba68e508bf3fdd172cc">
<MID>14</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:37:27</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>AC</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs>
<R Id="116">
<V>24.6ms</V>
<S>0</S>
</R>
<R Id="117">
<V>33.4ms</V>
<S>0</S>
</R>
<R Id="120">
<V>6.0ms</V>
<S>0</S>
</R>
<R Id="121">
<V>11.8ms</V>
<S>0</S>
</R>
<R Id="122">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="123">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="124">
<V>22.5mA</V>
<S>0</S>
</R>
<R Id="125">
<V>24.0mA</V>
<S>0</S>
</R>
<R Id="114">
<V>0.1V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="Pe931d0d28236473c98d6917e772dd95a">
<MID>14</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:39:00</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>A</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs>
<R Id="116">
<V>27.6ms</V>
<S>0</S>
</R>
<R Id="117">
<V>13.4ms</V>
<S>0</S>
</R>
<R Id="120">
<V>5.1ms</V>
<S>0</S>
</R>
<R Id="121">
<V>11.2ms</V>
<S>0</S>
</R>
<R Id="122">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="123">
<V>>300ms</V>
<S>0</S>
</R>
<R Id="124">
<V>39.0mA</V>
<S>0</S>
</R>
<R Id="125">
<V>27.0mA</V>
<S>0</S>
</R>
<R Id="114">
<V>0.0V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="Pe95c037ce6054bf29f593c7b51450eca">
<MID>2</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:09</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="230">
<V>1-phase</V>
</MP>
<MP Id="434">
<V>-</V>
</MP>
<MP Id="231">
<V>Voltage</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="436">
<V>Off</V>
</MP>
</MPs>
<Ls>
<L Id="97">
<V>207 V</V>
</L>
<L Id="98">
<V>253 V</V>
</L>
<L Id="101">
<V>207 V</V>
</L>
<L Id="102">
<V>253 V</V>
</L>
<L Id="103">
<V>0 V</V>
</L>
<L Id="104">
<V>10 V</V>
</L>
</Ls>
<Rs>
<R Id="1">
<V>237V</V>
<S>0</S>
</R>
<R Id="2">
<V>237V</V>
<S>0</S>
</R>
<R Id="3">
<V>0V</V>
<S>0</S>
</R>
<R Id="4">
<V>50.0Hz</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
<M Id="Pd9ea820cde7b4e18935e493578d30c33">
<MID>17</MID>
<IGuIds>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
</IGuIds>
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:54</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="108">
<V>C</V>
</MP>
<MP Id="28">
<V>10 A</V>
</MP>
<MP Id="29">
<V>0.1 s</V>
</MP>
<MP Id="31">
<V>1</V>
</MP>
<MP Id="235">
<V>-</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
</MPs>
<Ls>
<L Id="13">
<V>100 A</V>
</L>
</Ls>
<Rs>
<R Id="34">
<V>3.72kA</V>
<S>1</S>
</R>
<R Id="205">
<V>0.06Ohm</V>
<S>0</S>
</R>
<R Id="37">
<V>0.03Ohm</V>
<S>0</S>
</R>
<R Id="38">
<V>0.06Ohm</V>
<S>0</S>
</R>
<R Id="39">
<V>237V</V>
<S>0</S>
</R>
</Rs>
<S>1</S>
</M>
</Ms>
</SO>
<SO Id="Pf39c7fa412374063942a750fb782aca5">
<OID>2</OID>
<N>Tavle Navn 2</N>
<PID>P63d414fdaf8c414ab2bcc82314e94eb1</PID>
<Ps>
<P Id="71">
<V>Tavle Navn 2</V>
</P>
<P Id="3">
<V>TN-S</V>
</P>
<P Id="72">
<V>Isolationtest BMS-KT.45.6A.-1.01</V>
</P>
</Ps>
<Ms>
<M Id="P33b5ba5a01de477894b5ec64bba861e5">
<MID>4</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:30:31</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="4">
<V>500 V</V>
</MP>
<MP Id="11">
<V>-</V>
</MP>
</MPs>
<Ls>
<L Id="1">
<V>1 MOhm</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
</Ms>
</SO>
<SO Id="Pa223cb2e6b864204a698c4bbf5c397a5">
<OID>9</OID>
<N>F1</N>
<PID>Pf39c7fa412374063942a750fb782aca5</PID>
<Ps>
<P Id="96">
<V>F1</V>
</P>
<P Id="109">
<V>IEC/EN</V>
</P>
<P Id="111">
<V>100 A</V>
</P>
<P Id="110">
<V>10 A</V>
</P>
<P Id="105">
<V>0.4 s</V>
</P>
<P Id="108">
<V>C</V>
</P>
<P Id="114">
<V>30 mA</V>
</P>
<P Id="113">
<V>A</V>
</P>
<P Id="95">
<V>Kredsløb nr</V>
</P>
<P Id="97">
<V>Beskrivelse af kreds sikring</V>
</P>
<P Id="98">
<V>Kreds lokation</V>
</P>
</Ps>
<Ms>
<M Id="P887aca482c74455d8ba836d8aa2227d7">
<MID>7</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:41:28</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="56">
<V>LPE</V>
</MP>
<MP Id="152">
<V>Rpe</V>
</MP>
<MP Id="338">
<V>standard</V>
</MP>
</MPs>
<Ls>
<L Id="3">
<V>2 Ohm</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="P6b617c0c7f174edd9f6e6ba5d109a227">
<MID>14</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:37:27</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>AC</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="Pa85b10feaabb44c89de77669c1723762">
<MID>14</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:39:00</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="131">
<V>fixed</V>
</MP>
<MP Id="20">
<V>A</V>
</MP>
<MP Id="15">
<V>30 mA</V>
</MP>
<MP Id="233">
<V>-</V>
</MP>
<MP Id="14">
<V>EN 61008 / EN 61009</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="17">
<V>G</V>
</MP>
</MPs>
<Ls>
<L Id="6">
<V>50 V</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="P65d2c18f53a84fd9a20e282849821a90">
<MID>2</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:09</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="230">
<V>1-phase</V>
</MP>
<MP Id="434">
<V>-</V>
</MP>
<MP Id="231">
<V>Voltage</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
<MP Id="436">
<V>Off</V>
</MP>
</MPs>
<Ls>
<L Id="97">
<V>207 V</V>
</L>
<L Id="98">
<V>253 V</V>
</L>
<L Id="101">
<V>207 V</V>
</L>
<L Id="102">
<V>253 V</V>
</L>
<L Id="103">
<V>0 V</V>
</L>
<L Id="104">
<V>10 V</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
<M Id="Paf889a4c35e74ae79023232f78b0d24f">
<MID>17</MID>
<IGuIds />
<MPs>
<MP Id="1">
<V>07.01.2022 09:42:54</V>
</MP>
<MP Id="2">
<V>ALAM</V>
</MP>
<MP Id="3">
<V>2.13.26</V>
</MP>
<MP Id="108">
<V>C</V>
</MP>
<MP Id="28">
<V>10 A</V>
</MP>
<MP Id="29">
<V>0.1 s</V>
</MP>
<MP Id="31">
<V>1</V>
</MP>
<MP Id="235">
<V>-</V>
</MP>
<MP Id="242">
<V>TN/TT</V>
</MP>
</MPs>
<Ls>
<L Id="13">
<V>100 A</V>
</L>
</Ls>
<Rs />
<S>5</S>
</M>
</Ms>
</SO>
</Data>
<Is>
<I>
<IGuId>21101825-20.04.2021-2.13.26-4.0-ALAM</IGuId>
<IHwV>4.0</IHwV>
<IMiNm>MI 3152</IMiNm>
<ISwV>2.13.26</ISwV>
<ISer>21101825</ISer>
<ICalD>20.04.2021</ICalD>
<IPCode>ALAM</IPCode>
</I>
<I>
<IGuId>21101825-20.04.2021-2.13.42-4.0-ALAM</IGuId>
<IHwV>4.0</IHwV>
<INm>EurotestXC</INm>
<IMiNm>MI 3152</IMiNm>
<ISwV>2.13.42</ISwV>
<ISer>21101825</ISer>
<ICalD>20.04.2021</ICalD>
<IPCode>ALAM</IPCode>
</I>
</Is>
<Us>
<U />
</Us>
</Database>
foreach ($xml->Data->SO as $SO) {
if($SO->OID) {
echo '<li class="'.$IODs[(string)$SO->OID].'" alt="' . $SO->OID . ' title="' . $SO->OID . '">'. $SO->N . '';
echo '<ul>';
} else {
echo "OID: " . $SO->OID . "<br>";
echo "N: " . $SO->N . "<br>";
}
foreach ($SO->Ms->M as $M) {
echo '<li class="'.($M->S == 1 ? 'test_true' : 'test_false').'" alt="' . $M->S . ' title="' . $M->S . '">'. $MIDs[(string)$M->MID] . '';
}
if ($SO->As) {
foreach ($SO->As->A as $A) {
echo "<br>A: " . $A . "<br>";
}
}
}
I was making a website of one of my customers, when I was finished is uploaded the website to the web but some pages are very slow because of some images.
http://gthbouw.nl/Fotoboek/Outdoor.php
(this is page is the slowest)
<!DOCTYPE HTML>
<html lang="nl">
<head>
<title>Timmerbedrijf GTH bouw uit Hattem voor al uw timmerwerken.</title>
<!-- Meta -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="keywords" content="Timmerwerken,timmerbedrijf,klussenbedrijf,interieurbouw,maatwerk,kasten,balie,keukens,krukken,tafels,restauratie,hattem,zwolle,wezep,oldebroek,wapenveld,heerde,staphorst,meppel, Timmerwerken,timmerbedrijf,klussenbedrijf,interieurbouw,maatwerk,suitewand,balie,keukens,kasten,tafels,restauratie,hattem,zwolle,wezep">
<meta name="description" content="Timmerbedrijf GTH bouw voor al uw timmerwerken,kasten,meubels op maat,schuren,veranda's,kozijnen,suitewanden,houten vloeren. ">
<meta name="author" content="GTH Bouw">
<meta name="copyright" content="GTH bouw © Alle rechten voorbehouden.">
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<!-- Styles -->
<link href="_assets/magnifix-popup/magnific-popup.css" rel="stylesheet" type="text/css"/>
<link href="_assets/css/main.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="../assets/css/main.css" />
<style>
.cd-top {
display: inline-block;
height: 40px;
width: 40px;
position: fixed;
bottom: 40px;
right: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
background: #3498db url(https://codyhouse.co/demo/back-to-top/img/cd-top-arrow.svg) no-repeat center 50%;
visibility: hidden;
opacity: 0;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
}
.cd-top.cd-is-visible {
visibility: visible;
opacity: 1;
}
.cd-top.cd-fade-out {
opacity: .5;
}
.no-touch .cd-top:hover {
background-color: #e86256;
opacity: 1;
}
#media only screen and (min-width: 768px) {
.cd-top {
right: 20px;
bottom: 20px;
}
}
#media only screen and (min-width: 1024px) {
.cd-top {
height: 60px;
width: 60px;
right: 30px;
bottom: 30px;
}
}
</style>
<!-- Scripts -->
<script src="_assets/js/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="_assets/magnifix-popup/jquery.magnific-popup.min.js" type="text/javascript"></script>
<script src="_assets/js/main.js" type="text/javascript"></script>
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/skel.min.js"></script>
<script src="../assets/js/util.js"></script>
<script src="../assets/js/main.js"></script>
<script src="../assets/js/BackToTop.js"></scripts?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("a").on('click', function(event) {
if (this.hash !== "") {
event.preventDefault();
var hash = this.hash;
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
window.location.hash = hash;
});
}
});
});
</script>
</head>
This is my header maybe I need to change somtehing.
<body>
<!-- Wrapper -->
<div id="wrapper">
<!-- Main -->
<div id="main">
<div class="inner">
<!-- Header -->
<header id="header">
<a href="../index.html" class="logo" ><strong>GTH bouw</strong> timmerwerken.</a>
<ul class="icons">
<li>Kijk voor meer recent werk ook op Twitter. </li>
<li><span class="label">Twitter</span></li>
</ul>
</header>
<!-- Banner -->
<section id="banner">
<div class="content">
<header>
<h1>Outdoor
</h1>
<p>Laat u inspireren door GTH bouw.</p>
</header>
<p>Ook maak we veel dingen voor buitenhuis zoals bijvoorbeeld schuren, boomhutten & overkappingen. </p>
<ul class="actions">
<li>Kom verder</li>
</ul>
</div>
<span class="image object">
<img class="HeaderImg"src="../images/Outdoor.jpg" alt="" />
</span>
</section>
<!-- ImageGallery -->
<section id="ImageGallery">
<header class="major">
<a><h2>Fotoboek</h2></a>
</header>
<p>*voor de beste ervaring op je smartphone of tablet kunt u uw mobiel kantelen om zo een betere indruk te krijgen van wat GTH bouw allemaal doet.</p>
This is my first part of the body. (this is probably not the issue)
<div class="qt-photo-gallery-item qt-image-no-<?php echo $qt_counter; ?>">
<a class="qt-photo-gallery-item-link" href="<?php echo $qt_file_path; ?>" >
<div class="qt-photo-gallery-item-image-wrapper">
<img src="<?php echo $qt_file_path; ?>" class="qt-photo-gallery-item-image" />
</div>
</a>
</div>
<?php
if( $qt_counter == 5 ) {
$qt_counter = 0;
}
endif;
endwhile;
?>
This is my PHP bit where it reads images from a specific directory and then it echo's the image to an Image gallery as you can see at the top of this question.
<!-- Sidebar -->
<div id="sidebar">
<div class="inner">
<!-- Menu -->
<nav id="menu">
<header class="major">
<h2>Menu</h2>
</header>
<ul>
<li><a style="text-decoration: none;" href="../index.html" >Home</a></li>
<li>
<span class="opener">Fotoboek</span>
<ul>
<li><a href="InterieurBouw.php" >Interieur bouw</a></li>
<li><a href="Outdoor.php" >Outdoor</a></li>
<li><a href="Klantspecifiek.php" >Klantspecifiek</a></li>
<li><a href="Diversen.php" >Diversen</a></li>
</ul>
</li>
<li><a style="text-decoration: none;" href="../contact.html">Contact</a></li>
</ul>
</nav>
<!-- Section -->
<section>
<header class="major">
<h2>Wat ik doe</h2>
</header>
<div class="mini-posts">
<article>
<img src="../images/InterieurBouw.jpg" alt="" />
<p><b>Interieur bouw,</b></br>U kunt ons in huren om uw woonkamer, Keuken, Badkamer te maken en in te richten. Zo maken we bijvoorbeeld tafels, stoelen, kasten en nog veel meer.</p>
</article>
<article>
<img src="../images/Outdoor.jpg" alt="" />
<p><b>Outdoor,</b></br>Ook maken we veel dingen voor buitenhuis zoals bijvoorbeeld schuren, boomhutten & overkappingen. </p>
</article>
<article>
<img src="../images/Klantspecifiek.jpg" alt="" />
<p><b>Klantspecifiek,</b></br>Natuurlijk doen wij ook veel projecten voor klanten die iets specifieks willen voor hun huis of winkel.</p>
</article>
</div>
</section>
<!-- Section -->
<section>
<header class="major">
<h2>Contact</h2>
</header>
<p>U kunt natuurlijk op vele verschillende mogelijkheden contact met mij opnemen. Wilt u vrijblijvend een afspraak maken of een offerte ontvangen? Neem dan contact met mij op door een mail te sturen of door gewoon even te bellen.</p>
<ul class="contact">
<li class="fa-envelope-o">info#gthbouw.nl</li>
<li class="fa-phone">(Mob) 06 - 2281 7245</li>
<li class="fa-home">Schipsweg 13 8051 KG<br />
Hattem.</li>
<li class="fa-map-marker">Locatie</li>
<div style="width: 100%; margin-top: 15px;"><iframe width="100%" height="300" src="https://maps.google.com/maps?width=100%&height=600&hl=en&coord=52.4822692, 6.036609999999996&q=Schipsweg%2013%208051%20KG%20Hattem.+(GTH)&ie=UTF8&t=&z=11&iwloc=B&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe></div><br />
</ul>
</section>
<!-- Footer -->
<footer id="footer">
<p class="copyright">© GTHbouw Alle rechten voorbehouden.</p>
</footer>
<!-- Back to top -->
Top
</div>
</div>
</div>
</body>
This is the rest of my body and the other stuff
The images are compressed and about 0,4 mb or something.
Can anyone help me making this webpage faster.
You should compress and resize your images.
Try this: https://imageresize.org/compress-images
and now you replace your old uncompressed images with compressed images.
Let us know the page load time after that. :)
Edit: As pointed out by #Mehdi If it's dynamic(Uploaded via PHP) you can use Imagick to resize and compress on upload.
Example for resize: http://php.net/manual/en/imagick.resizeimage.php
Example for compress: http://php.net/manual/en/imagick.setimagecompressionquality.php
I'm currently working on a custom built wordpress template for a customer. I've finished the homepage (http://www.spotutrecht.com/) and was about to add a new page (http://www.spotutrecht.com/spot-map/).
Now I have the following issue: The style.css only succesfully applies the styles to my homepage, but not to the "spot-map" page. I've referenced the stylesheet in the header.php and it a functioning link to the stylesheet apears in the head tag. I've clicked on it and it shows my stylesheet. Still, it does not apply the styles to my "spot-map" page.
I'm still new to template building, so maybe (and I hope) I am doing something very obvious wrong, but I can't figure out what it is.
My header.php:
<?php
/**
* The header for our theme.
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* #link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* #package Spot_Utrecht
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!-- Bootstrap core CSS -->
<link href="<?php bloginfo('stylesheet_directory'); ?>/assets/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome Icons -->
<link href="<?php bloginfo('stylesheet_directory'); ?>/assets/css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Raleway:400,500,600,700' rel='stylesheet' type='text/css'>
<!-- Stylehsheet.css -->
<link href="<?php echo get_template_directory_uri(); ?>/style.css" rel="stylesheet">
<?php wp_head(); ?>
<!-- HTML5 shiv and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'spotutrecht' ); ?></a>
<div class="page-wrap">
<!-- HEADER
================================================== -->
<header class="site-header" role="banner">
<!-- NAVBAR
================================================== -->
<div class="navbar-wrapper">
<div class="navbar navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="social-buttons">
<i class="fa fa-facebook"></i>
<i class="fa fa-instagram"></i>
</div>
</div>
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => 'nav',
'container_class' => 'navbar-collapse collapse',
'menu_class' => 'nav navbar-nav navbar-right'
) );
?>
</div><!-- container -->
</div>
</div>
</header>
My spot-map/crowdfunding page
<?php
/*
Template Name: Crowdfunding
*/
get_header(); ?>
<section id="spotbanner-otherpages">
<article>
<div class="container">
<div class="row">
<div class="col-sm-3">
</div>
<div class="col-sm-6 logo_container">
<img src="<?php bloginfo('stylesheet_directory') ?>/assets/img/spot_square.png" alt="SPOT Logo">
</div>
<div class="col-sm-3">
</div>
</div>
</div>
</article>
</section>
<section class="frontpage white">
<article>
<div class="container">
<div class="row">
<div class="col-sm-2">
</div>
<div class="col-sm-8">
<h1>SPOT kaart van Utrecht in de maak door Rood Gras</h1>
<p class="lead">Samen met Utrechtse illustrator Rob van Barneveld is SPOT bezig om een alternatieve kaart van Utrecht te ontwerpen. Hierbij wordt de toerist tips gegeven voor koffiezaken en die anders wellicht onontdekt zouden blijven. En hierbij hebben ze jullie hulp hard nodig!</p>
<p>Het idee ontstond doordat de Utrechters vinden dat hun stad meer te bieden heeft dan de gebruikelijke toeristische hotspots. Utrecht barst van de leuke kleine zaakjes en met een getekende kaart hopen ze hiervoor meer reclame te kunnen maken. </p>
<p>Het uiteindelijke doel is een reeks plattegronden samen te stellen met behulp van diverse lokale vormgevers, elk met een eigen thema. De kaarten wordt uiteindelijk in gelimiteerde oplage gezeefdrukt op A0-formaat en als poster geprint met RISO op A3-formaat bij Kapitaal. Ook wordt er samen gewerkt met hostels en zal de plattegrond in kaartvorm worden verkocht om de bekendheid te vergroten</p>
<h2>Wie is Rob van Barneveld?</h2>
<p>Rob van Barneveld is een Utrechtse illustrator met kenmerkende stijl die werkt onder de naam Rood Gras. Momenteel bekend van zijn kopjes en strips, maar binnenkort van de plattegrond! Hij werkt voor o.a. De Correspondent en VPRO en heeft een succesvolle webshop. </p>
<h2>Waarom deze plattegrond?</h2>
<p>Met deze plattegrond brengt SPOT je op andere plekken. SPOT kan op deze manier in de behoeftes van de toeristen en nieuwe utrechters voorzien. Velen worden op dit moment naar de standaard plekken gestuurd, maar ‘act like a local’ en ga van de gebaande paden af. SPOT vindt het belangrijk dat Utrecht niet alleen herkend en bekend wordt door haar grachten en domtoren maar ook herkend en bekend wordt door haar initiatieven, koffie, kroegen en etc en te voorzien in een beleving. Door deze overzichtelijke plattegrond brengt SPOT de mensen daar. Daarnaast wordt het ook nog eens een super souvenir van de stad Utrecht. </p>
<h2>Waarom het thema koffie?</h2>
<p>Het aantal koffiezaken in Utrecht is in 10 jaar geëxplodeerd en stuk voor stuk zijn ze razend populair. Maar wat maakt ze onderscheidend? En hoe komen toeristen er terecht? Rob van Barneveld maakt (in opdracht) kopjes en ander servies met een grappige afbeelding; een plattegrond over koffie sluit hier natuurlijk perfect bij aan! </p>
<h2>Waarom financieel bijdragen?</h2>
<p>Momenteel is deze crowdfundingpagina erzodat mensen geld kunnen bijdragen om het project te realiseren. Afhankelijk van het bedrag dat in wordt gelegd kunnen verschillende bedankjes worden verkregen. Waarom zou je dit doen? Omdat je zo lokale vormgevers steunt, je nieuwe Utrechters en bezoekers helpt te ontdekken wat deze stad zo ontzettend tof maakt en je er een bijzondere beloning voor terug krijgt. En vooral: omdat wij jou dan ontzettend dankbaar zullen zijn!</p>
<h2>Maar wat is die beloning dan?</h2>
<p>Wanneer je een bepaald bedrag doneert, krijg je daar het volgende voor terug:
<table class="crowdfunding">
<tr><td class="price">€10</td> <td class="reward">een plattegrond</td></tr>
<tr><td class="price">€25</td> <td class="reward">een Rood Gras ansichtkaartenset en een plattegrond</td></tr>
<tr><td class="price">€50</td> <td class="reward">een Rood Gras koffiekopje en een plattegrond</td></tr>
<tr><td class="price">€100</td> <td class="reward">een Rood Gras gepersonaliseerd koffiekopje en een RISO poster</td></tr>
<tr><td class="price">€150</td> <td class="reward">een Rood Gras ansichtkaartenset, twee koffiekopjes en een RISO poster</td></tr>
<tr><td class="price">€175+</td> <td class="reward">een zeefdruk van de plattegrond</td></tr>
</table>
</p>
</div>
<div class="col-sm-2">
</div>
</div>
</div>
</article>
</section>
<section class="frontpage blue">
<article>
<div class="container">
<div class="row">
<div class="col-sm-2">
</div>
<div class="col-sm-8">
<div class="icon-container">
<i class="fa fa-clock-o" name="Clock Icon"></i>
</div>
<h1>Opening Hours</h1>
<p class="center">
Wednesday: 10:00 - 18:00 <br>
Thursday: 10:00 - 18:00 <br>
Friday: 10:00 - 18:00 <br>
Saturday: 11:00 - 18:00
</p>
</div>
<div class="col-sm-2">
</div>
</div>
</div>
</article>
</section>
</div><!-- page wrap div -->
<?php get_footer(); ?>
You have missed one closing braces for span.reward class.
span.reward {
margin-left: 10px;
Close that selector and the styles will get applied.
In a mobile web app that I'm building I keep getting the same problem over and over again.
In my index.php I redirect to the login.php if no value in my session is set. After the user logs in I redirect back to index.php. I've tried this with a header redirection via PHP as well as via a $.mobile.changePage() method from JQuery.
What happens with both ways Is that at first the page division of #home loads. When I use my Navbar to change to a new page division in the same multi-page it loads the login.php again.
index.php
session_start();
require "init.inc";
$email = $_SESSION['email'];
if(!isset($email)){header("Location: login.html");}
else{
echo
'<!DOCTYPE hmtl>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile=web-a-status-bar-style" content="black">
<!-- link naar icons-->
<link rel="apple-touch-icon" sizes="114x114" hrf="apple-touch-icon.png"/>
<title>Loyalty Barcode</title>
<!-- link naar stylesheet -->
<link rel="stylesheet" href="css/mobile.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css"/>
<link rel="stylesheet" href="css/themes/loyalty.css" />
<!-- link naar de jquery en javascript -->
<script src="/js/functions.js"></script>
<script src="/js/Jquery.loadphp.js"></script>
<script src="http://code.jquery.com/jquery-1.6.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.js"></script>
</head>
<body>
<!--/////////////////////////////////// #home (barcode) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\-->
<div data-role="page" id="home">
<!-- header -->
<header data-role="header" data-theme="a">
<h1>Loyalty Home</h1>
</header>
<!-- einde header -->
<article id="barcode">
<!-- Content -->
<div class="content">
<p>Hier vind u, uw Loyalty barcode. Met deze barcode kunt u de passen die u van winkels heeft gekregen aanmelden.</p>
<br/>
<img src="images/barcode.png" height="150px" width="200px"/>
</div>
<!-- Einde Content -->
<article id="leeg">
</article>
<!-- Footer -->
<footer data-role="footer">
<nav data-role="navbar">
<ul>
<li><a href="#kortingen-algemeen" data-icon="star" data-theme="b" >Kortingen</a></li>
<li>Barcode</li>
<li>Boodschappen</li>
</ul>
</nav>
</footer>
<!-- Einde footer -->
</article>
</div>
<!--\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Einde van #home /////////////////////////////////////-->
<!--/////////////////////////////////// #kortingen-algemeen \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\-->
<div data-role="page" id="kortingen-algemeen">
<!-- header -->
<header data-role="header" data-theme="a">
<a data-rel="back" data-role="button" data-theme="b" data-inline="true" data-iconpos="notext" data-icon="arrow-l" class="ui-btn-left"></a>
<h1>Loyalty Kortingen</h1>
</header>
<!-- einde header -->
<article id="kortingen">
<!-- Content -->
<div class="content">
<div data-role="collapsible-set" data-theme="b" data-content-theme="d" data-inset="true">
<ul data-role="listview" data-split-icon="plus" data-split-theme="c" data-inline="true">
<li>
<img src="images/ah-logo.png" />
<h3>Albert Heijn</h3>
</li>
</ul>
<ul data-role="listview" data-split-icon="plus" data-split-theme="c" data-inline="true">
<li>
<img src="images/ah-komkommers.jpg" />
<h3>Komkommers, 0,39 cent</h3>
</li>
</ul>
</div>
</div>
<!-- Einde content -->
<article id="leeg">
</article>
<!-- Footer -->
<footer data-role="footer">
<nav data-role="navbar">
<ul>
<li>Algemeen</li>
<li>Persoonlijk</li>
</ul>
</nav>
</footer>
</article>
<!-- Einde footer -->
</div>
<!--\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Einde van #kortingen-algemeen /////////////////////////////////////-->
<!-- *********************************** #kortingen-persoonlijk ************************************* -->
<div data-role="page" id="kortingen-persoonlijk">
<!-- header -->
<header data-role="header" data-theme="b">
<a data-rel="back" data-role="button" data-theme="b" data-inline="true" data-iconpos="notext" data-icon="arrow-l" class="ui-btn-left">Terug</a>
<h1>Loyalty Kortingen</h1>
Instellingen
</header>
<!-- einde header -->
<article id="kortingen">
<!-- Content -->
<div class="content">
Hier komen de verschillende persoonlijke kortingen te staan.
</div>
<!-- Einde content -->
<article id="leeg">
</article>
<!-- Footer -->
<footer data-role="footer">
<nav data-role="navbar">
<ul>
<li>Algemeen</li>
<li>Persoonlijk</li>
</ul>
</nav>
</footer>
</article>
<!-- Einde footer -->
</div>
<!--*********************************** Einde #kortingen-persoonlijk *********************************** -->
</body>
</html>
?>
login.php
session_start();
require "init.inc";
$email=$_POST['email'];
$wachtwoord=$_POST['wachtwoord'];
if (($email&&$wachtwoord) && (isset($_POST['wachtwoord'])))
{
$query = mysql_query("SELECT * FROM user WHERE email='$email'");
$numrows = mysql_num_rows($query);
if ($numrows!=0)//als het aantal rijen niet 0 is
{
while($row = mysql_fetch_assoc($query))//zolang er rijen zijn
{
$dbid = $row['userId'];
$dbemail = $row['email']; /
$dbwachtwoord = $row['wachtwoord'];
}
if ($email==$dbemail&&$wachtwoord==$dbwachtwoord)
{
$_SESSION['email']=$dbemail;
echo'
<header><link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css"/></header>
<body><script>$.mobile.changePage( "index.php");</script></body>
';
exit;
}
else
{
echo"Verkeerd wachtwoord ingevuld. Probeer het opnieuw a.u.b.";
}
}
}
There are multiple problems with the code you've posted here. So excuse me if I'm stating the obvious here.
First of all, you are redirecting to login.html whereas you mention login.php.
Change
if(!isset($email)){header("Location: login.html");}
To
if(!isset($email)){header("Location: login.php");}
Secondly, don't forget to remove the "/" typo in login.php:
$dbemail = $row['email']; /
By the way, it's best practice not to echo all of your HTML layout code, I see you're using that in index.php.
Finally: You can use
header("Location: index.php");
To navigate between your login and index page without any problems.
I've modified your code, it's currently live at the following URL: click here for a demo
For your reference, find my (working) modified login.php code below:
Login.php
NOTE: I've added a form to demonstrate the functionality
<?php
session_start();
require "init.inc";
if(isset($email)){header( "Location: index.php" ); }
$email=$_POST['email'];
$wachtwoord=$_POST['wachtwoord'];
/*****************************************************************************************************
* 2-11-2012 Shinigami: I'm checking only if the session variable "email" and "wachtwoord" is set, *
* I'm not using any database verification at the moment, you should implement that further yourself *
* Uncommenting the code below should work for you I suppose *
*****************************************************************************************************/
if (($email&&$wachtwoord))
{
/*
$query = mysql_query("SELECT * FROM user WHERE email='$email'");
$numrows = mysql_num_rows($query);
if ($numrows!=0)//als het aantal rijen niet 0 is
{
while($row = mysql_fetch_assoc($query))//zolang er rijen zijn
{
$dbid = $row['userId'];
$dbemail = $row['email'];
$dbwachtwoord = $row['wachtwoord'];
}
if ($email==$dbemail&&$wachtwoord==$dbwachtwoord)
{
if ($email){ //not neccessary
*/
/*******************************************************
* 2-11-2012 Shinigami: This is where the magic happens *
********************************************************/
$_SESSION['email']=$email;
header( "Location: index.php" );
/*
}
}
else
{
echo"Verkeerd wachtwoord ingevuld. Probeer het opnieuw a.u.b.";
} */
//}
}
?>
<html>
<head>
<title>Login page</title>
</head>
<body>
<form method="post" action="login.php">
<input type="text" name="email"></input>
<input type="text" name="wachtwoord"></input>
<input type="submit">
</form>
</body>
</html>
How does one select the first sibling of a xml node with all its child nodes and apply some transformations on it? So far I only succeeded in selected either the first sibling and only the first sibling (no child nodes that is) or everything following the xml node.
Say we have xhtml like this:
<div class="chapter">Chapter <span class="number">1.1</span> Lorum ipsum</div>
<h2 class="article">Article <span class="number">1.</span> Lorum ipsum</h2>
<p>Lorum ipsum</p>
And the result we are after is xml like this:
<chapter>
<heading>
<label>Chapter</chapter>
<number>1.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</chapter>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum</par>
</article>
</chapter>
My guess is that I need to do some regex magic to get the label and title tags right, but if this could also been done using plain xslt that would be great.
This XSLT 1.0 transformation:
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xhtml"
>
<xsl:output encoding="utf-8" />
<!-- the identity template (copies all nodes verbatim, unless
more specific templates implement different behavior) -->
<xsl:template match="node()|#*">
<xsl:copy>
<xsl:apply-templates select="node()|#*" />
</xsl:copy>
</xsl:template>
<!-- start by applying templates to all chapter divs -->
<xsl:template match="xhtml:html">
<text>
<xsl:apply-templates select="xhtml:body/xhtml:div[#class='chapter']" />
</text>
</xsl:template>
<!-- chapter div: generate heading, apply templates to adjacent h2 -->
<xsl:template match="xhtml:div[#class='chapter']">
<chapter>
<xsl:apply-templates select="." mode="heading" />
<!-- ... where the first preceding chapter div has the same ID -->
<xsl:apply-templates select="
following-sibling::xhtml:h2[
generate-id(preceding-sibling::xhtml:div[#class='chapter'][1])
=
generate-id(current())
]
"/>
</chapter>
</xsl:template>
<!-- h2: generate heading, apply templates to adjacent paras -->
<xsl:template match="xhtml:h2[#class='article']">
<article>
<xsl:apply-templates select="." mode="heading" />
<xsl:apply-templates select="
following-sibling::xhtml:p[
generate-id(preceding-sibling::xhtml:h2[#class='article'][1])
=
generate-id(current())
]
"/>
</article>
</xsl:template>
<!-- headings follow the same scheme, so we can use a unified template -->
<xsl:template match="xhtml:div | xhtml:h2" mode="heading">
<heading>
<label>
<xsl:value-of select="normalize-space(text()[1])" />
</label>
<number>
<xsl:value-of select="normalize-space(xhtml:span[#class='number'])" />
</number>
<title>
<xsl:value-of select="normalize-space(text()[2])" />
</title>
</heading>
</xsl:template>
<xsl:template match="xhtml:p">
<par>
<xsl:apply-templates select="node()" />
</par>
</xsl:template>
</xsl:stylesheet>
when applied to
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div class="chapter">Chapter <span class="number">1.1</span> Lorum ipsum</div>
<h2 class="article">Article <span class="number">1.</span> Lorum ipsum</h2>
<p>Lorum ipsum A</p>
<p>Lorum ipsum B</p>
<h2 class="article">Article <span class="number">2.</span> Lorum ipsum</h2>
<p>Lorum ipsum D</p>
<h2 class="article">Article <span class="number">3.</span> Lorum ipsum</h2>
<p>Lorum ipsum E</p>
<p>Lorum ipsum F</p>
<div class="chapter">Chapter <span class="number">2.1</span> Lorum ipsum</div>
<h2 class="article">Article <span class="number">1.</span> Lorum ipsum</h2>
<p>Lorum ipsum G</p>
</body>
</html>
yields:
<text>
<chapter>
<heading>
<label>Chapter</label>
<number>1.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum A</par>
<par>Lorum ipsum B</par>
</article>
<article>
<heading>
<label>Article</label>
<number>2.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum D</par>
</article>
<article>
<heading>
<label>Article</label>
<number>3.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum E</par>
<par>Lorum ipsum F</par>
</article>
</chapter>
<chapter>
<heading>
<label>Chapter</label>
<number>2.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<par>Lorum ipsum G</par>
</article>
</chapter>
</text>
This stylesheet creates the desired output:
<xsl:template match="html:div[#class='chapter']" mode="chapter">
<xsl:element name="{#class}">
<heading>
<xsl:apply-templates mode="chapter" />
</heading>
<xsl:apply-templates select="following-sibling::html:h2[generate-id(preceding-sibling::html:div[#class='chapter'][1])=generate-id(current())]" mode="chapter" />
</xsl:element>
</xsl:template>
<!--template for h2 in "chapter" mode, creates article content for the chapter-->
<xsl:template match="html:h2[#class='article']" mode="chapter">
<xsl:element name="{#class}">
<heading>
<xsl:apply-templates mode="chapter"/>
</heading>
<xsl:apply-templates select="following-sibling::html:p[generate-id(preceding-sibling::html:h2[#class='article'][1])=generate-id(current())]" mode="chapter" />
</xsl:element>
</xsl:template>
<xsl:template match="text()[following-sibling::html:span[#class='number']]" mode="chapter">
<label><xsl:value-of select="normalize-space()"/></label>
</xsl:template>
<!--Generate an (number) element using the class attribute as the name of the element-->
<xsl:template match="html:span[#class='number']" mode="chapter">
<xsl:element name="{#class}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
<!--title elements created for text nodes before the -->
<xsl:template match="text()[preceding-sibling::html:span[#class='number']]" mode="chapter">
<title><xsl:value-of select="normalize-space()"/></title>
</xsl:template>
<!--Template in "chapter" mode, creates a par element inside the article-->
<xsl:template match="html:p" mode="chapter">
<para><xsl:value-of select="normalize-space()"/></para>
</xsl:template>
<!--prevent text from bleeding through in output-->
<xsl:template match="text()" mode="chapter"/>
Using Tomalak's example input XML, produces:
<?xml version="1.0" encoding="UTF-8"?>
<book>
<chapter>
<heading>
<label>Chapter</label>
<number>1.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum A</para>
<para>Lorum ipsum B</para>
</article>
<article>
<heading>
<label>Article</label>
<number>2.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum D</para>
</article>
<article>
<heading>
<label>Article</label>
<number>3.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum E</para>
<para>Lorum ipsum F</para>
</article>
</chapter>
<chapter>
<heading>
<label>Chapter</label>
<number>2.1</number>
<title>Lorum ipsum</title>
</heading>
<article>
<heading>
<label>Article</label>
<number>1.</number>
<title>Lorum ipsum</title>
</heading>
<para>Lorum ipsum G</para>
</article>
</chapter>
</book>