Re: [xsl] Namespace attribute problem with Saxon

Subject: Re: [xsl] Namespace attribute problem with Saxon
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 16 Jan 2006 11:35:49 GMT
This is a FFFFAQ.

> , the schema I used to create the document is referenced in the outermost node, 

The document that you posted does not have a reference to a schema (an
xsl:schemaLocation attribute) it has a namespace declaration.
every element and attribute name in xpath has two parts, a namespace
name and a local name. Changing the namespace (by removing xmlns=) has
very similar effect from other systematic name cahnages, eg if you
prefixed all element names with X. The names in teh stylesheet will not
match unless you make similar changes to the Xpath expressions.

<List xmlns="http://knihtisk.org/LibraryList.xsd";>

is List in the namespace http://knihtisk.org/LibraryList.xsd.
To match that in xslt declare a prefix in teh stylesheet, eg
xmlns:l="http://knihtisk.org/LibraryList.xsd";
then use patterns such as match="l:List".

If you remove xmlns from your source then that is List in no-namespace
which you would match in XSLT with match="List".

David




________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread