Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] a bit of distraction ' quiz of XSLT 1.0 oddities'

From: Geert Josten <Geert.Josten@----------->
To:
Date: 1/3/2006 11:27:00 AM
Another one:



----



given xml:



<input>
  <set1>
    <item>a</item>
    <item>b</item>
  </set1>
  <set2>
    <item>c</item>
    <item>d</item>
  </set2>
</input>

and (portion of) xsl:
<xsl:variable name="set1" select="/input/set1/*" />
<xsl:variable name="set2" select="/input/set2/*" />

How do you test whether the two sets have _no_ intersect? (And what is the common mistake?)



Geert Josten wrote:



Hi,



Here some additions for your 'quiz'..



:-)



-------------------------------------------------------------



Does exclude-result-prefixes defined on an xsl:stylesheet element apply
to subtrees included with xsl:include ?




How about the other way around; that attribute defined in an xsl that is 
included, but not in the main xsl.



And same questions for things like xsl:output, xsl:preserve-space and 
xsl:strip-space..



--------------------------------------------------------------



Is there any way of using apply-templates using a mode 'decided' at run
time ?




Can you generate a custom XSL out of another XSL without using 
xsl:element and xsl:attribute for each xsl element in the target XSL 
document?



-------------------------------------------------------------



What does this do?



        <xsl:value-of select="name()"><a>some text</a></xsl:value-of>




:-D



-------------------------------------------------------------




<snip/>



I fumbled around a lot with the document function, tree fragments and 
key function. How about:



Can you create a variable containing the rtf-element as a node-set?



<xsl:variable name="rtf">
  <rtf>.. some tree fragment ..</rtf>
</xsl:variable>

----



Can you read in a list of xml files with one statement?



----



What is the result when the xsl is applied to text1.xml?



text1.xml:
<text>A</text>

text2.xml:
<text>B</text>

xsl:
<xsl:key name="text" match="text" use="'all'" />

<xsl:template match="/">
  <xsl:for-each select="document('text2.xml')">
    <xsl:copy-of select="key('text', 'all')" />
  </xsl:for-each>
<xsl:for-each>

----



Kind regards,
Geert




--
Drs. G.P.H. Josten
Consultant





Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is 
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken 
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.


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