Hello friends,
this one should be fairly easy - yet I can't get it to work properly. I'm still quite a noob with XML.
The XML might look a bit overly split up to you. This comes from how it was produced. I generate it from my old Word documents. basically simply extract the text, identify the heading and the image in it. All set up equally...
This is what my XML looks like:
Now, these "<br/>" are the crucial part. I have inserted them in places, where I need a line break. All other text not containing such breaks shall be concatenated.
So far, it already works halfway, the page is displayed just as defined in the css.
But the lines won't break.
This is how I tried to solve it in the css. This is my complete css:
Why don't the lines break?
Am I doing something basically wrong or am I just missing something tiny but vital?
Thanks a lot!
Cheers,
Andy
[blue]Help us, join us, participate
IAHRA - International Alliance of Human Rights Advocates[/blue]
this one should be fairly easy - yet I can't get it to work properly. I'm still quite a noob with XML.
The XML might look a bit overly split up to you. This comes from how it was produced. I generate it from my old Word documents. basically simply extract the text, identify the heading and the image in it. All set up equally...
This is what my XML looks like:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="poetry.xsl" ?>
<DOC2XML>
<article>Aktivisten</article>
<image>Aktivisten.jpg</image>
<sentence>
<text>Das ist ein Aktivist.[b]<br/>[/b]</text>
</sentence>
<sentence>
<text>Sieht komisch aus. </text>
</sentence>
...
...
So far, it already works halfway, the page is displayed just as defined in the css.
But the lines won't break.
This is how I tried to solve it in the css. This is my complete css:
Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]
<xsl:template match="DOC2XML">
<HTML>
<HEAD>
<LINK REL="stylesheet" TYPE="text/css" HREF="poetry.css"/>
</HEAD>
</HTML>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="article">
<h2><xsl:value-of select="."/></h2>
</xsl:template>
<xsl:template match="image">
<p><img src="{.}"/></p>
</xsl:template>
<xsl:template match="sentence">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text">
<xsl:value-of select="."/>
</xsl:template>
[b]<xsl:template match="br">
<br/>
</xsl:template>[/b]
</xsl:stylesheet>
Why don't the lines break?
Am I doing something basically wrong or am I just missing something tiny but vital?
Thanks a lot!
Cheers,
Andy
[blue]Help us, join us, participate
IAHRA - International Alliance of Human Rights Advocates[/blue]