You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Sayeau, Derek" <De...@Cognos.COM> on 2002/03/07 03:50:18 UTC

XSLTC & Xerces2.0.1

Does anyone know if the latest (2.3.1) XSLTC stuff has been tested/verified
with the latest Xerces(2.0.1)?  I have a stylesheet/input doc that
works with the latest XSLTC and Xerces 1.4 (or whatever the last release
number was before 2.0), but failes on namespace
stuff when using the latest Xerces.  I'd like to get an idea of what's
*supposed* to work before digging any deeper.

Thanks,

-derek

............................................................................
.
Derek Sayeau				3755 Riverside Drive	
Information Delivery 			Ottawa, ON  
Cognos Inc. 				K1G 4K9
 (613) 738-1338 ext. 5097
derek.sayeau@cognos.com
............................................................................
.




This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

Re: XSLTC and keys and optimizations

Posted by "Robert S. Koberg" <ro...@koberg.com>.
Hi,

Tom Amiro wrote:
> Hi Robert,
> 
> Check out
> 
>   http://xml.apache.org/xalan-j/xsltc/xsltc_performance.html
> 
> That may give you some insight.
> 


Yes, but not exactly. I currently use ALOT of keys (VERY common in 
XSLT). The results Jacek posted on cocoon-dev have made me want to look 
at switching to XSLTC

Can you suggest the best way to handle a situation I have? The XML 
structure is a hierarchical representation of a site. There are folders 
and pages. An XML content piece can be assigned at the folder level to 
cascade down to all pages in the folder or a content piece can be 
assigned at the page level. The content pieces just have IDs pointing to 
a node in a separate 'content.xml' config document [XML below] so the 
pieces can be reused easily.

Say I want to find the active page nodeset and put it in a variable. Is 
this the best way to identify a page with XSLTC?

<xsl:variable
    name="active_nodeset"
    select="//page[@id=$id]"/>

I find the page, then I need to find the representation in content.xml 
[below]. Is this the best way?

<xsl:variable
    name="xml_nodeset"
    select="document('content.xml')//xml[@id=$active_nodeset/@id]"/>

thanks,
-Rob
---------------------------------------------------------------------
Stripped down example:
--- site.xml ----
<config>
    <folder id="f0000000001">
       <col type="narrow_left"/>
       <col type="wide_center"/>
       <col type="narrow_right"/>
       <page id="p0000000001">
          <col type="narrow_left"/>
          <col type="wide_center">
             <xml id="index_en.xml"/>
          </col>
          <col type="narrow_right"/>
       </page>
       <folder id="f742372637">
         <col type="narrow_left"/>
         <col type="wide_center"/>
         <col type="narrow_right">
            <xml id="c242640179.xml"/>
         </col>
	<page id="p268675785">
            <col type="narrow_left"/>
            <col type="wide_center">
               <xml id="c1602691198.xml"/>
            </col>
            <col type="narrow_right"/>
         </page>
         <folder id="f28737725">
            <col type="narrow_left"/>
            <col type="wide_center"/>			
            <col type="narrow_right"/>
            <page id="p1284141096">
               <col type="narrow_left"/>
               <col type="wide_center"/>
               <col type="narrow_right"/>
            </page>
          </folder>
       </folder>
    </folder>
</config>
=================================
--- content.xml ---
<config>
    <content id="f0000000001" owner="rk123">
       <xml label="Main Home page" id="index_en.xml" owner="default"/>
       <content id="f742372637" owner="rk123">
          <xml label="boop" id="c1602691198.xml" owner="default"/>
          <xml label="hjhjhjhjh" id="c242640179.xml" owner="default"/>
	 <content id="f28737725" owner="rk123">
             <xml label="scoobie" id="c366915042.xml" owner="default"/>
          </content>
        </content>
    </content>
</config>


Re: XSLTC and keys and optimizations

Posted by Tom Amiro <To...@Sun.COM>.
Hi Robert,

Check out

  http://xml.apache.org/xalan-j/xsltc/xsltc_performance.html

That may give you some insight.

Tom
 
"Robert S. Koberg" wrote:
> 
> Hi,
> 
> XSLTC
> ---------------
> If using XSLTC, it's current state, should you avoid using xsl:key? I
> noticed bug reports about it. Is it even worth it to use keys in XSLTC?
> ========================================================
> 
> Xalan optimizations
> ----------------
> Scott Boag mentioned some optimaztions he was working on making
> expensive xsl ( like //*[@id=$id] ) as fast as keying it. I was
> wondering if this would also have the same effect on XML brought in
> through the document function ( document('my.xml')//*[@id=$id]) )?
> 
> best,
> -Rob

-- 
 Tom Amiro -- SQA Engineer
 Sun XML Technology Development
 voice: 781-442-0589 Fax: 781-442-1437
 eMail: tom.amiro@.sun.com

XSLTC and keys and optimizations

Posted by "Robert S. Koberg" <ro...@koberg.com>.
Hi,

XSLTC
---------------
If using XSLTC, it's current state, should you avoid using xsl:key? I 
noticed bug reports about it. Is it even worth it to use keys in XSLTC?
========================================================

Xalan optimizations
----------------
Scott Boag mentioned some optimaztions he was working on making 
expensive xsl ( like //*[@id=$id] ) as fast as keying it. I was 
wondering if this would also have the same effect on XML brought in 
through the document function ( document('my.xml')//*[@id=$id]) )?

best,
-Rob


Re: XSLTC & Xerces2.0.1

Posted by Tom Amiro <To...@Sun.COM>.
Derek,

XSLTC has been tested with the version of Xerces that Sun 
is putting in the current beta release of JAXP we are 
working on. I believe it is a 2. something version. I'm 
copying Edwin Goei, who I'm sure will know for sure.

Tom

"Sayeau, Derek" wrote:
> 
> Does anyone know if the latest (2.3.1) XSLTC stuff has been tested/verified
> with the latest Xerces(2.0.1)?  I have a stylesheet/input doc that
> works with the latest XSLTC and Xerces 1.4 (or whatever the last release
> number was before 2.0), but failes on namespace
> stuff when using the latest Xerces.  I'd like to get an idea of what's
> *supposed* to work before digging any deeper.
> 
> Thanks,
> 
> -derek
> 
> ............................................................................
> .
> Derek Sayeau                            3755 Riverside Drive
> Information Delivery                    Ottawa, ON
> Cognos Inc.                             K1G 4K9
>  (613) 738-1338 ext. 5097
> derek.sayeau@cognos.com
> ............................................................................
> .
> 
> This message may contain privileged and/or confidential information.  If you
> have received this e-mail in error or are not the intended recipient, you
> may not use, copy, disseminate or distribute it; do not open any
> attachments, delete it immediately from your system and notify the sender
> promptly by e-mail that you have done so.  Thank you.

-- 
 Tom Amiro -- SQA Engineer
 Sun XML Technology Development
 voice: 781-442-0589 Fax: 781-442-1437
 eMail: tom.amiro@.sun.com