XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Mark KiefferSubject: Selected values are not showing up
Author: Mark Kieffer
Date: 19 Jul 2007 02:45 PM
Hello,

I am trying to use two XML files to output one XML file.
The problem is that whenever I ask for a value from a document nothing shows up! I have a feeling that I need to include the xmlns in the stylesheet, but this isn't working. What do I need to add to the stylesheet to get this to work?


UnknownABBI_Fed.xml
ABBI_Fed.xml

UnknownABBI_Wiki.xml
ABBI_Wiki.xml

UnknownABBI_Test.xsl
ABBI_Test.xsl

Postnext
(Deleted User) Subject: Selected values are not showing up
Author: (Deleted User)
Date: 20 Jul 2007 12:33 PM
Hi Mark,
as you guessed, it's a problem of namespaces. You need to add to the root of the stylesheet two declarations, e.g. xmlns:wiki="http://www.mediawiki.org/xml/export-0.3/" and xmlns:fed="http://datafed.net/xs/Catalog"

Then, change the XPath expression to include them, like in

document('ABBI_Wiki.xml')/wiki:mediawiki/wiki:page/wiki:id
document('ABBI_Wiki.xml')/wiki:mediawiki/wiki:page/wiki:title
document('ABBI_Fed.xml')/fed:dataset/fed:data/fed:data_domain/fed:data_domain_abbr

Hope this helps,
Alberto


Posttop
Mark KiefferSubject: Selected values are not showing up
Author: Mark Kieffer
Date: 20 Jul 2007 12:56 PM
Alberto,

This worked perfectly! Thank you very much for responding so quickly.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.