Subject: Re: xt + lotusxsl (fwd) From: Nantapon Chaimunkong <b38npc@xxxxxxxx> Date: Thu, 28 Jan 1999 09:53:34 +0700 (GMT) |
---------- Forwarded message ---------- Date: Wed, 27 Jan 1999 14:37:37 -0500 From: Scott_Boag/CAM/Lotus@xxxxxxxxx To: Nantapol Chaimankong <b38npc@xxxxxxxx> Cc: James Clark <jjc@xxxxxxxxxx> Subject: Re: xt + lotusxsl (Nantapol or James, could you post this on the xsl-list for me, since I can't because it doesn't like my mail address?) > hi, > I am developing XSL processor for senior project. I tested it and found > that the result is not similar to xt nor lotusxsl( xt and lotusxsl usually > get same result.) So I have some questions about xt and lotusxsl. First, please note that the LotusXSL testsuite should not by any means be taken as authoritative. Hopefully it is useful as a contribution for interoperability testing until an authoritative test suite comes along. You should probably generally use the XT parser as the "reference" implementation -- i.e. when LotusXSL and XT show conflicting results, you should defer to XT. I am working very hard to get character-level fidelity with the output of XT, so that users can reliably create a stylesheet that is interoperable at least between the two parsers (and hopefully others). Also, make sure you are using version 0_15f of LotusXSL for these tests. > (1) Both xt and lotusxsl seems to implements some kind of specificity. What > rule do they use from previous draft? Is priority attribute come first? No, they don't implement specificity. Document order and the priority attribute are the tie-breaking conflict resolution mechanism for the moment. LotusXSL warns you about any conflicts that will be resolved using document order. These can always be 'fixed' using the priority attribute. > (2) Can i use namespace prefix or default namespace in pattern? > > source document: > <doc xmlns="default" xmlns:a="abc"> > <a:para>hi</a:para> > </doc> Yes. > How can I write select pattern to select text hi can we write "/doc/a:para" > or "/default#doc/abc#para"? I thinks the first solution should works if > default namespace and namespace a is declared at that stylesheet's > containing element. I implement it this way. The namespace URI in the pattern must come from the stylesheet. So for the above, you might do <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:docnamespace="default" xmlns:abcspace="abc"> <xsl:template match="docnamespace:doc "> <xsl:value-of select="abcspace:para"/> </xsl:template> </xsl:stylesheet> > The original problem is with lotusxsl's testSuite test no. 20. The > stylesheet declares default namespace to HTML4.0 and has select pattern > ".//titlepage". My implementation treats titlepage belongs to HTML4.0 and > cannot select anything. I'm not sure I grocked your question correctly. The default namespace of the stylesheet is not used in the patterns. Does this help? > (3) I am also confused by test no. 15. The source document contains > > <c name="id15" id="id16"> *id15* > <a id="id16"> *id16*</a> ... > > The stylesheet declares the following: > > <xsl:id attribute="id"/> > <xsl:id attribute="name" element="c"/> > You forgot to include the xsl:id declarations from the stylesheet: <xsl:id attribute="id"/> <xsl:id attribute="name" element="c"/> > Shouldn't element c has both id15 and id16? Element a also has id16 then the > processor should report error or use element c. I got different result from > lotusxsl. Maybe, maybe not. I guess I was thinking that <xsl:id attribute="name" element="c"/> was more important than <xsl:id attribute="id"/>, and therefore would override the ID specification for all "c" elements. This is probably a question for James to see if I've got it right or not. > Please correct me. > Thanks > Nantapol -scott XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Namespaces and IE5b2, john . markor | Thread | Announcement, Didier PH Martin |
RE: Namespaces and IE5b2, David Schach | Date | Re: xt + lotusxsl, Nantapon Chaimunkong |
Month |