John Emmas | 9 May 11:41
Picon

Source code

Hello there,

Is the source code for libxslt available somewhere?  I'm sure it will be - but wherever I've looked I only seem
to find the 'dev' versions (i.e. header files and binaries).  I'm sure it'll be somewhere obvious but I've
drawn a blank, so far....  :-(

John
Daniel Veillard | 7 May 08:15
Picon
Favicon
Gravatar

Upcoming release

  Hello everybody,

I'm way behind in making a release, but I will use most of this week
to work on making the next libxml2 (and possibly libxslt) release(s).
I will go over bugs in GNOME bugzilla and try to find patches lying
there, if you have some and see no movement in the next couple of
days, make sure they are provided as attachment and marked as patches.
You can also send to the list if bugzilla is a problem,

  thanks,

Daniel

--

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel <at> veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
Lothar | 21 Apr 07:10
Picon

Function doc-available not found error?

Hi,

I figured out that there is a way to check for existing documents in XSLT 2.0 templates. Trying this in my
template does not work.

I am using libxslt in my code (not with xsltproc). Do I have to load another library or activate the function
in my C++ code some how?

If not, is there an equivalent function in XSLT 1.1?

Thanks, Lothar

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Ginsterweg 4
65760 Eschborn
Phil Shafer | 18 Apr 17:18
Favicon

string(node-set)

I was a bit surprised to see the xpath spec says string() of
a node-set should be the string of the first (in document order)
node, not the complete node set.

Does anyone know the history or rationale for this behavior?

Short of a loop, what's the easiest way to turn a node set into a
string of all the members of that node set?

Thanks,
 Phil
Rich Bodo | 29 Mar 21:03
Picon

Rich Bodo wants to stay in touch on LinkedIn

 
 
 
 
 
From Rich Bodo
 
Professional
San Francisco Bay Area
 
 
 

The,

I'd like to add you to my professional network on LinkedIn.

- Rich Bodo

 
 
 
td>
 
 
 
You are receiving Invitation to Connect emails. Unsubscribe
© 2012, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA
 
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
xslt <at> gnome.org
http://mail.gnome.org/mailman/listinfo/xslt
Phil Shafer | 26 Mar 22:24
Favicon

func:function and "xsltApplySequenceConstructor: value-of was not compiled"

Should exsltFuncFunctionComp() be compiling it's contents?  Currently
it calls xsltParseTemplateContent(), but not xsltInitElemPreComp()
(or similar function).

The impact is that if you make the mistake of putting content
directly in your <func:function>, you get:

xsltApplySequenceConstructor: value-of was not compiled

and no clue where the bug in your script is.   If your script also
has text nodes, you get:

xsltApplySequenceConstructor: value-of was not compiled
  ELEMENT fake
element fake: error : Node has no parent
    TEXT
      content=        
{http://xml.juniper.net/test}test-func: cannot write to result tree while executing a function
xmlXPathCompiledEval: evaluation failed
runtime error: file /tmp/te30.xsl line 5 element value-of
XPath evaluation returned no result.

which is much more helpful.  Would compiling the contents of the
function help get a better error to the user?

Examples appended (with and without text nodes).

Thanks,
 Phil

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

% cat /tmp/te30.xsl
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:func="http://exslt.org/functions" xmlns:test-ns="http://xml.juniper.net/test" version="1.0">
  <xsl:template match="/">
    <test>
      <xsl:value-of select="test-ns:test-func()"/>
    </test>
  </xsl:template>
  <func:function name="test-ns:test-func">
    <xsl:value-of select="concat(&quot;Between &quot;, $x)"/>
  </func:function>
</xsl:stylesheet>
% xsltproc /tmp/te30.xsl /tmp/te30.xsl
xsltApplySequenceConstructor: value-of was not compiled
  ELEMENT fake
element fake: error : Node has no parent
    TEXT
      content=        
{http://xml.juniper.net/test}test-func: cannot write to result tree while executing a function
xmlXPathCompiledEval: evaluation failed
runtime error: file /tmp/te30.xsl line 5 element value-of
XPath evaluation returned no result.
<?xml version="1.0"?>
<test xmlns:func="http://exslt.org/functions" xmlns:test-ns="http://xml.juniper.net/test"/>
% cat /tmp/te30a.xsl
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:func="http://exslt.org/functions" xmlns:test-ns="http://xml.juniper.net/test" version="1.0">
  <xsl:template match="/">
    <test>
      <xsl:value-of select="test-ns:test-func()"/>
    </test>
  </xsl:template>
  <func:function name="test-ns:test-func"><xsl:value-of select="concat(&quot;Between &quot;, $x)"/></func:function>
</xsl:stylesheet>
% xsltproc /tmp/te30a.xsl /tmp/te30a.xsl
xsltApplySequenceConstructor: value-of was not compiled
<?xml version="1.0"?>
<test xmlns:func="http://exslt.org/functions" xmlns:test-ns="http://xml.juniper.net/test"/>
% diff -u /tmp/te30.xsl /tmp/te30a.xsl
--- /tmp/te30.xsl	2012-03-26 14:27:46.000000000 -0400
+++ /tmp/te30a.xsl	2012-03-26 16:02:51.000000000 -0400
@@ -5,7 +5,5 @@
       <xsl:value-of select="test-ns:test-func()"/>
     </test>
   </xsl:template>
-  <func:function name="test-ns:test-func">
-    <xsl:value-of select="concat(&quot;Between &quot;, $x)"/>
-  </func:function>
+  <func:function name="test-ns:test-func"><xsl:value-of select="concat(&quot;Between &quot;, $x)"/></func:function>
 </xsl:stylesheet>
% xsltproc --version
Using libxml 20708, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20707, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20707
libexslt 815 was compiled against libxml 20707
% 
David Schwartz | 15 Mar 04:56

libxsltmod for Python 3.2

I have updated the libxsltmod code to work with Python 3.2
Initial testing appears to be ok but I shall continue updating all the tests now.

My question is this:

How shall I go about submitting these changes to the project?

_________________________________________
David 'dex' Schwartz
 Win32 Technical Lead ∫
  Objective Corporation Limited 
  Ph: +61 (0)2 9965 7868 
  Mobile: +61 (0)407 254 425 
  http://www.objective.com 
  mailto:David.Schwartz <at> objective.com

This e-mail may contain confidential and/or privileged information. If you are not the intended
recipient (or have received this e-mail in error) please notify the sender immediately and destroy this
e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly
forbidden. 
_______________________________________ 


_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
xslt <at> gnome.org
http://mail.gnome.org/mailman/listinfo/xslt
Denis Davidov | 1 Mar 21:15
Picon

Calling XPath-function from XSLT Element handler

Hello!

I've registered external module (test), external element (test:foo)
and external XPath-function (test:bar). I need to call test:bar from
test:foo C++ handler so that test:bar will "see" all current XSLT
entities (stylesheet variables, etc).

Please look at this short code example. I've created XML that contains
one empty root node and XSL that contains one variable ($var) and one
test:foo element. When I perform XSL transformation, I need to
evaluate XPath-expression from test:foo handler, that contains
test:bar($var) call:

http://www.everfall.com/paste/id.php?wlyu7lb528hy

I didn't find how can I evaluate XPath-expression with registred
external XPath function, and how can I make current XSLT-environment
visible for this XPath-expression. The point isn't in making visible
one single variable either one single function. The point is in making
all external functions and XSLT-environment visible from this
XPath-expression. Any suggestions?

Thanks!

Denis.
Denis Davidov | 27 Feb 20:07
Picon

(no subject)

Hello. First of all, thanks for libxml and libxslt! I’m working on
software that uses both of the libraries and I found GNOME XML/XSLT
libraries very easy to use. Thanks, guys!

I have several questions and I hope I’ll find some help here. Here they are:

1. I’m trying to pass parameters into XSL, but something goes wrong
and it doesn’t work. Here I’ve published very short code example that
illustrates simple XSL transformation and parameter passing:
http://www.everfall.com/paste/id.php?76x88mgneaad

Unfortunately it doesn’t work. “value-of” element just returns an
empty string. I have this output:

<?xml version="1.0" encoding="utf-8"?>
Param =

What do I do wrong? You can edit code example right on the website
where its published.

2. When I create xsltTransformContext (using xsltNewTransformContext),
I have to specify both XML and XSL documents. When I call
xsltApplyStylesheetUser, I also need to pass both XML and XSL document
pointers. Why do I need to do this two times? Here is an explanation
why do I ask: I register a lot of extension elements and functions,
and perform a lot of transformations on the different documents and
style sheets. I don’t want to register all extensions each time when I
need to transform new XML-XSL pair, I want to reuse XSLT context.
Currently I do it in this way:
http://www.everfall.com/paste/id.php?y22esn1kbwic

Is there any better way to solve this problem?

3. When I perform transformation, I have a lot of such errors in stdout:

element div: error : Name is not from the document dictionnary 'div'

(btw, there is a misspell in “dictionary”). If I’ll specify XHTML
namespace in the XSL as a default namespace, then there are no such
errors. But I don’t want to specify it in XSL. I want to know:
- How I can specify my own dictionary using libxslt API?
- How I can switch error reporting off?

4. Assume that I have xmlDoc, xmlXPathContext (constructed from this
xmlDoc), and xmlNode (somewhere from this xmlDoc). I want to perform
XPath-request as if this node was the root of the document. What is
the best way to do this? Currently I replace root node, perform the
request, and place the root node back:
http://www.everfall.com/paste/id.php?wzgzmx95uza8

Is there any better solution for this?

Ok, that’s it for now, thanks for help :)

Denis.
Andriy Gerasika | 17 Feb 17:15
Picon

XSLT 2.0

Hello,
was experimenting w/ enhancing libxml2/libxslt to support XSLT 2.0:
https://github.com/andriy-gerasika/libxml2/commits/master

it is very lame, but I am not professional C/C++ developer, need some 
guidance:
a) support xpath2.0/xslt2.0 as a config option? (default no)
b) how to support unicode in lower-case() function --> use icu/iconv?

Andriy
Konrad Korzeniowski | 16 Dec 18:06

number() floated?

Hi there,

I'm using 1.1.26-6 version of libxslt (Debian Lenny), and cannot find any explanation regarding described below behaviour.

I got following simple xslt file:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    <xsl:template match="/">
    <xsl:value-of select="number('8.95')"/>
    </xsl:template>
</xsl:stylesheet>

running xsltproc with this xsl against any xml gives:
8.949999999999999

Is this expected? Shouldn't this be 8.85?

Thanks for any explanation.

Best regards,
Konrad Korzeniowski
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
xslt <at> gnome.org
http://mail.gnome.org/mailman/listinfo/xslt

Gmane