Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: problem with xhtml-tags after transformNode

From: Joerk <Olaf.Joerk@----.------.-------.-->
To: NULL
Date: 4/10/2008 11:44:00 PM
On 10 Apr., 13:35, Martin Honnen <mahotr...@yahoo.de> wrote:

Thanks for your answer.

> Joerk wrote:
> > I', trying to transform a xml-file with a node containing xhtml-code.
> > Here is the part of the schema:
>
> > <xs:element name="Nodename">
> >   <xs:complexType>
> >     <xs:sequence>
> >       <xs:any namespace="http://www.w3.org/1999/xhtml" minOccurs="1"
> > maxOccurs="unbounded"  processContents="lax"/>
> >     </xs:sequence>
> >     <xs:anyAttribute namespace="http://www.w3.org/1999/xhtml"/>
> >   </xs:complexType>
> > </xs:element>
>
> > When declaring the node as:
>
> > <Nodename>
>
> The schema says "Rechtsmittel" not "Nodename".

Was my fault when copy&pasting the text. The nodenames in the
schema and in the xml file are the same.

>
> >   <div xmlns="http://www.w3.org/1999/xhtml">
> >     <p><STRONG>Some text...</STRONG></p>
>
> Note that XHTML defines an element named 'strong' but not an element
> named 'STRONG'.
>

I got this html-code from a XHTML-Online Editor. So I thought, the
case
doesn't matter.

> >     ... more xhtml ...
> >   </div>
> > </Nodename>
>
> > I get only the text, without any formatting, table etc.
>
> > When writing the node content as CDATA, I get the xhtml-code as is
> > into my document.
>
> > How can I manage it, to get the paragraphs, tables and formattings as
> > defined in xhtml ?
>
> Can you show us the stylesheet? I assume you are using one as the
> subject mentions transformNode.
>

I'm creating my style sheets with StyleVision">StyleVision. So it's very long. I
think
I paste the part of the header and the relevant node. Hope this helps.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xsl:output version="1.0" encoding="UTF-8" indent="no" omit-xml-
declaration="no" media-type="text/html" />
    <xsl:template match="/">
        <html>
            <head>
                <title />
            </head>
            <body>
                <xsl:for-each select="GSW">

GSW is the root node.

:

<xsl:for-each select="Rechtsmittel">
  <span style="font-family:Arial; font-size:12pt; ">
    <xsl:apply-templates />
  </span>
</xsl:for-each>

>
>         Martin Honnen --- MVP XML
>        http://JavaScript.FAQTs.com/

Thank you for any hints.

Olaf


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent