course, if you're not designing the XML, then you don't get any choice in
the matter - I was just saying that I don't think using xsi:nil is good
not working under Saxon-SA then you're probably not pressing the right
buttons to get schema-validated input.
try it from the command line first: make sure saxon9sa.jar is on the
classpath, and use the option -val:strict on the command
want to do this using JAXP interfaces alone, then
sure you are using com.saxonica.SchemaAwareTransformerFactory,
playing with fn:nilled, try something simpler like
<xsl:message><xsl:value-of select="* instance of
will say "true" if the input has been successfully
30 January 2009 02:37
Subject: Re: [saxon] Use of
To: Mailing list for the SAXON XSLT and
Actually it is useful in SOA applications, because there are several platforms
(Progress OpenEdge, used by thousands of companies everywhere, for
example) that send null fields as xsi:nil elements instead of
omitting them, and require xsi:nil elements to be sent when fields are
null. When working with these platforms,
you might want to check for xsi:nil elements and either remove or
transform them to something else.
The fn:nilled function is a better
solution than @xsi:nil = 'true', the de facto workaround. Since my last post, I've tried getting it to work with
both Saxon-B and Saxon-SA without success, though I may have insisted to
use JAXP (DocumentBuilderFactory with Schema and XMLReader with
ValidationHandler) for too long. Let me know if I should try the Saxon API
If you want more information about use
cases like this, we can talk off-list.
simplest way of explaining fn:nilled() is that it returns true if two
conditions are satisfied:
(a) the element specifies
(b) the element is validated against a
be honest, I don't know of any practical use case for this function. I
think that the "nilled" property was needed in the data model to make
the formal semantics work, and having got the property in the data
model, people felt it ought to be accessible to applications. If you
find a good use for it, let me know, because I can't think of
Generally xsi:nil is a
bit of a disaster anyway. I don't see why you can't represent absent
data by omitting the element, rather than having it present with no
From: Fernando Ribeiro [mailto:email@example.com]
29 January 2009 16:57
Subject: [saxon] Use of
To: Mailing list for the SAXON XSLT and XQuery
I've been trying to use the
nilled function but it seems like I am missing something about it. I'd
appreciate if you could take a look at the attached example and find
out why it doesn't work as expected.
Note that there ain't a schema (with
nillable=true) attached to the source, as in the actual case (ain't an
option) upon which the example is based.
I am currently using 22.214.171.124,
which is embedded with the runtime in question.
SF.net email is sponsored by:
wants to tell your story.
mailing list archived at http://saxon.markmail.org/