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 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
joe bedocsSubject: an xpath query that works in query editor doesn't work in xslt
Author: joe bedocs
Date: 16 Feb 2007 11:46 AM
Any assistance that can be provided is much appreciated.

The source xml document is attached as XmiTest.xmi

In the xpath query editor, the xpath query "/XMI/XMI.content/UML:Diagram" returns two hits, as it should.

In the attached xsl file, line 8266 contains the following xsl statement:

<xsl:for-each select="/XMI/XMI.content/UML:Diagram">

Whether in debug mode or not, this statement is returning no hits. In debug mode, if a watch is set with the name =/XMI/XMI.content, the correct value is returned. But if the watch is set to /XMI/XMI.content/UML:Diagram an empty value returns.

The built-in xslt processor is being used.


UnknownXmiTest.zip
contains xmi and xsl documents

Postnext
(Deleted User) Subject: Re: an xpath query that works in query editor doesn't work in xslt
Author: (Deleted User)
Date: 16 Feb 2007 12:24 PM
Hi Joe,
the problem is that the XSLT stylesheet associates the UML prefix to
the namespace "org.omg.xmi.namespace.UML" while the XML document
associates it to "omg.org/UML13", so the UML:Diagram query done by
the XSLT cannot match the UML:Diagram node of the document.
I don't know which namespace is right, but you must make them match.

Hope this helps,
Alberto

Posttop
joe bedocsSubject: Re: an xpath query that works in query editor doesn't work in xslt
Author: joe bedocs
Date: 16 Feb 2007 01:04 PM
Thanks for your assistance. I have stared for hours; sometimes fresh eyes go a long ways.

 
Topic Page 1 2 3 4 5 6 7 8 9 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.