This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Apologies and 2 questions


> 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
> http://www.w3schools.com/ 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
/></sectiontext>).

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?

Nate

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]