[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: "xmlns" problem for transform

Subject: Re: "xmlns" problem for transform
From: Chenzhou Cui <ccz@xxxxxxxxx>
Date: Thu, 04 Aug 2005 04:28:31 +0800
Re:  "xmlns" problem for transform
Dear Joris:

Thank you very much! Now the problem is PARTLY solved. After I add the non-default namespace for my xslt filter and all needed prefix, the filter works well with schema assigned data files. However, it can not transform files without schema. An opposite problem to before.

How can I do?

cheers,

Joris Gillis wrote:

Hi,

Tempore 21:02:56, die 08/03/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Chenzhou Cui <ccz@xxxxxxxxx>:

it can't transform
the body of sample file with "schema" assigned.


As the post's subject indicates, this is a namespace-related problem indeed.

The schema sets the default namespace to "http://www.ivoa.net/xml/VOTable/v1.1", you need to define in your xslt a namespace with this uri and a chosen prefix (I know 'xmlns="http://www.ivoa.net/xml/VOTable/v1.1"' is already present; you need to add another non-default namespace declaration). e.g. 'xmlns:VOT="http://www.ivoa.net/xml/VOTable/v1.1"'

Next step is to find all element names in any xpath expression or pattern in your xslt and add the prefix.

e.g. <xsl:for-each select="//RESOURCE/TABLE/FIELD" /> becomes

<xsl:for-each select="//VOT:RESOURCE/VOT:TABLE/VOT:FIELD"/>

regards,


--
============================================================
Chenzhou Cui  (Chinese Virtual Observatory: China-VO)
National Astronomical Observatory | Tel: (8610)64841695
Chinese Academy of Sciences       | FAX: (8610)64878240
20A Datun Road, Chaoyang District | Email: ccz@xxxxxxxxx
Beijing 100012, China             | WWW: www.lamost.org/~cb
============================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.