RE: [xsl] Apologies and 2 questions

Subject: RE: [xsl] Apologies and 2 questions
From: Nathan Shaw <n8_shaw@xxxxxxxxx>
Date: Fri, 20 Jul 2001 08:43:03 -0700 (PDT)
> As a book for XSL I highly recommend "XSLT 2nd
> Edition Programmer's 
> Reference" by Michael Kay ISBN 1-861005-06-7 (and
> not only because he's a 
> member of this forum and answers lots of questions
> ;-))

Cool, I will check this out most definitely!

> As a newbie I liked the site
> a lot with their 
> hands-on-tutorials for nearly everything

Yes, I have pretty much exhausted these tutorials.
They are a great primer though.
> Question 1:
> I think in a sectiontext-template a <xsl:copy-of
> select="."/> should work.

Nope. No luck there. I am using MSXML3 by the way. The
error I get says that "Element content is invalid
according to the DTD/Schema. Expecting #PCDATA."

Of course, I have the element defined as <!ELEMENT
SectionText (#PCDATA)>.

I am installing and will be testing this out on
InstantSaxon as well in case it is an MSXML issue.

> Question 2:
> I don't follow you here, because if there is HTML in
> your XML, it already 
> has to be well-formed to have a well-formed XML.
> This is not well-formed XML:
> <root>
>   <p>text<br>more text</p>
> </root>
> So you have to explain your problem to us.

All of the HTML within the element is well-formed
(<sectiontext><b>this is bold text</b><br

BUT, when the XML is parsed by the XSLT, it outputs
the <br /> tag as <br>. If I am using the XHTML1.0
Transitional DTD to define my output, it will not
validate. It needs to be output as <br />. Same goes
for any other standalone tags <img />, <hr />, <input
/>, etc.... Does that make sense?


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

 XSL-List info and archive:

Current Thread