You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Vaskin Kissoyan <vk...@lokion.com> on 2002/08/21 22:32:23 UTC

xml-izing a site

question about paragraph formatting and taking such content and properly 
displaying it:

I've created an item.xml and item.xsl file and there is a description 
for the item such as:

<item>
<name>Widget</name>
<description>This is a widget.
</description>
</item>

Now I want to extend the ability for users of this format to put in a 
description such as they would have in a long-description from a word 
document such as (of course word would not do paragraph markers like 
this, but you get the picture):
<p>
All work and no play make jack a dull boy. All work and no play make 
jack a dull boy. All work and no play make jack a dull boy. All work and 
no play make jack a dull boy. All work and no play make jack a dull 
boy. All work and no play make jack a dull boy.
</p>
<p>
All work and no play make jack a dull boy. All work and no play make 
jack a dull boy. All work and no play make jack a dull boy. All work and 
no play make jack a dull boy. All work and no play make jack a dull 
boy. All work and no play make jack a dull boy.
</p>

Is there anyway to insert html into the <description> element? 
 currently I just made a <paragraph> element which gets repeated and 
gets formatted as above. I'm looking for a more elegant solution which 
might involve parsing word for paragraphs or the like.

Thanks in advance!



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: xml-izing a site

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Vaskin Kissoyan wrote:
> question about paragraph formatting and taking such content and properly 
> displaying it:
...
> Is there anyway to insert html into the <description> element? currently 
> I just made a <paragraph> element which gets repeated and gets formatted 
> as above. I'm looking for a more elegant solution which might involve 
> parsing word for paragraphs or the like.

Stricly spoken, you can't insert HTML in general, because it
is not necessarily well formed XML. You can however insert
XHTML (or tidied HTML) and insert it into the output by using
xsl:copy-of.

Parsing Paragraphs and the like is possible but not very
nice in XSLT. You can look into the XSL FAQ and the XSL
list archive, or ask on the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/
This topic comes up now and then on the list, I'm sure
there is something in the archive, you just have to dig
it up.

J.Pietschmann



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>