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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + Why is this variable not showi... (7)
-> + Customising Schema Prefix (3)
-> + Please help!! XML AND XSL Tra... (6)
-> + XML to Excel in Home Edition (2)
-> + how to copy elements from an x... (2)
-> + Setting Saxon parameters in pi... (2)
-> + Trying to move SS license (3)
-> + Does SS PRO Support CSS (2)
-> - Selected values are not showin... (3)
-> ->Selected values are not s...
-> ->Selected values are not s...
-> + Copy Xpath To Clipboard Option... (2)
-> + Upgrading to SS 2006 3 - Activ... (3)
-> + XSL Efficiency tips (4)
-> - Report page Size and table hea... (1)
-> + Endless loop with xquery (8)
-> - Xpress XML (1)
-> + Extracting XML data into SQL s... (2)
-> + Crashes when I save (2)
-> + XSL cannot save: I/O error...b... (8)
-> + Diagram view has disappeared f... (5)
-> + Convert from http://www.w3.org... (2)
-- Previous [1501-1520] [1521-1540] [1541-1560] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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.

   
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.