Register  Login       Search  
Forum  
 
  
 
Forum  Forum     
 
SearchForum Home
  XML Lab Products  nxslt  extension-eleme...
 extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
 
sergey_shandar
8 posts
Joined
9/11/2005

extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 16 Oct 05 5:30 AM (Australia)
Is there any way how to use exsl:document when extension-element-prefixes="exsl"?

I have the error message when I try to do it:

Error occurred while executing stylesheet 'project/list.xsl'.

System.Xml.Xsl.XsltException: '' cannot be a child of '' element.
   at System.Xml.Xsl.NewInstructionAction.Execute(Processor processor, ActionFrame frame)
   at System.Xml.Xsl.ActionFrame.Execute(Processor processor)
   at System.Xml.Xsl.Processor.Execute()
   at System.Xml.Xsl.XslTransform.Transform(IXPathNavigable input, XsltArgumentList args, XmlWriter output)
   at NXslt.NXslt.Process()

olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 16 Oct 05 5:54 AM (Israel)
This is actually known bug/feature of .NET's XslTransform class. It doesn't support extension elements at all, but throws an exception when anything is listed in extension-element-prefixes.

This is documented in the nxslt documentation.

If you can - just don't use extension-element-prefixes.

If you have to - it's probably feasible to write a filtering XmlReader that removes extension-element-prefixes while stylesheet is loaded into XslTransform. I'd implement it for nxslt.exe but only if you explain me why you have to use extension-element-prefixes - is it portability issue?

Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
sergey_shandar
8 posts
Joined
9/11/2005

Re: extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 16 Oct 05 6:11 AM (Australia)
>I'd implement it for nxslt.exe but only if you explain me why you have to use extension-element-prefixes - is it portability issue?

Yes, it is. I want to use (E)XSLT files not only with NXSLT. For example, 4xslt can't handle (E)XSLT without
extension-element-prefixes.
olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 16 Oct 05 7:02 AM (Israel)
Oh, I see. Ok, I'll implement it ASAP. Expect nxslt 1.6.2 in a couple of days.
Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
sergey_shandar
8 posts
Joined
9/11/2005

Re: extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 16 Oct 05 7:11 AM (Australia)
Thanks. :-)
olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 17 Oct 05 2:52 PM (Israel)
I've uploaded nxslt 1.6.2, can you please verify that using extension-element-prefixes works now?
Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
sergey_shandar
8 posts
Joined
9/11/2005

Re: extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 17 Oct 05 6:34 PM (Australia)
Sorry, Oleg. But 1.6.2 doesn't work properly in some cases. For example:

a.xml
<?xml version="1.0"?>
<a/>
a.xsl
<?xml version="1.0"?>
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:exsl="http://exslt.org/common"
    extension-element-prefixes="exsl">

<xsl:import href="aa.xsl"/>

</xsl:stylesheet>
aa.xsl
<?xml version="1.0"?>
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:exsl="http://exslt.org/common"
    extension-element-prefixes="exsl">

<xsl:template match="*">
    <exsl:document href="b.xml"><b/></exsl:document>
</xsl:template>

</xsl:stylesheet>
nxslt a.xml a.xsl -mo
Error occurred while executing stylesheet 'a.xsl'.

System.Xml.Xsl.XsltException: '' cannot be a child of '' element.
...


olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: extension-element-prefixes="exsl" and exsl:document. NXSLT-1.6.1.
Posted: 17 Oct 05 10:55 PM (Israel)
Oh yeah, I forgot about imports/includes. Try 1.6.3 please.
Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
  XML Lab Products  nxslt  extension-eleme...
Forum Home  Search