Hi Johannes,
Johannes Graumann wrote:
Svante Schubert wrote:
I can see now that your <xsl:value-of select="."/> is not intended.
Neglect it, as it is already used by default in every XSLT stylesheet
http://www.w3.org/TR/xslt#built-in-rule
This should fix your main problem, otherwise I did not understand the
output you desired. ;-)
Oh yes - it did! Thanks grand-master of the crystal ball!
I just don't understand why the tutorial I was trying to work from uses this
left and right (http://books.evc-cit.info/odbook/ch09.html) ...
The difference is, the tutorial you mentioned is using xsl:value-of for
certain elements and attributes, but you desired only the text output
for your current node '.'.
What happened in your stylesheet: as you used already
xsl:apply-templates, all your xsl:templates rules had been checked
including the built-in-rule for text nodes:
<xsl:template match="text()|@*">
<xsl:value-of select="."/>
</xsl:template>
By this you indirectly did already a <xsl:value-of select="."/> and
don't have to type it, explicitly again.
As you do not want a carridge return in your heading, you should not use
text:p in a text:h. BTW it is not allowed in a text:h anway, only
'paragraph-content' and 'text-number' are.
Instead of text:p use a text:span.
Thanks for that as well! I was earlyier asking for an intuitive introduction
to all of this stuff and got pointed to the link above - which, as you
could tell by the result, didn't turn out intuitive enough for me ... Do
you have a pointer where elements and what's allowed in them is nicely
explained?
Others on this list might answer this better...
My way of doing it, downloading the RelaxNG Schema into some directory
and using JEdit to search through the directory, using Hypersearch to
list the hits, when question arise I use to search for the
element/attribute in the OpenDocument specification itself.
The other more empiric way is simply write some document and save it
'flat' as one XML stream with the XSLT copy / ident filter as mentioned
earlier before on this mailing list.
I further suggest to use the xsl:output element for the encoding and
switch the indent:
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
For example you may use indent during testing to ease the review of your
output.
Wait - this applies to me writing an output filter - no? I'm writing an
input filter to OO only - so I can work with ConTeX and OO from one single
custom XML code base ... should be spiffy (if it ever get's done). I work
in an accademic environment where WORD rains supreme, but prefer the
typographic niceties a TeX derived system comes with. Was maintaining
parallel documents so far and intend to have that end ...
The xsl:output references the output of the XSL transformation and is
not office dependent. Therefore works for input and output filter in the
same manner.
Thanks for your help - I'm sure there'll be more questions to come!
Always welcome, when I don't answer immediately, I might want give
others the chance to answer, or I am simply on vacation ;-)
One more thing: I find it MAJORLY inconvenient to have OO crash (freeze) on
you every time you break your *.xsl ... shouldn't that be handled more
gracefully? Where would I complain about that?
If it freeze, as your XSL is incorrupt, it is a problem of mine, as I am
basically responsible now for the XML based filters.
If your stylesheet produces invalid OpenDocument XML, please find out,
what exactly is invalid and triggers the freeze and write an issue
addressing the application, which freezes.
In general I suggest to test your stylessheets first stand-alone on
commandline before using them in the Office.
Thanks again, Joh
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Regards,
Svante
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]