This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 139967 - Wrong XPath (namespace) used when schemas used in XSLT use "Ref" attribute.
Summary: Wrong XPath (namespace) used when schemas used in XSLT use "Ref" attribute.
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: XSLT (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vitaly Bychkov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-15 01:48 UTC by svr_76
Modified: 2009-12-07 09:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
XSLT project to demonstrate wrong XPath (with wrong namespace prefix) when schemas use Ref attribute to refer to Global elements. (11.28 KB, application/x-compressed)
2008-07-15 01:49 UTC, svr_76
Details

Note You need to log in before you can comment on or make changes to this bug.
Description svr_76 2008-07-15 01:48:21 UTC
I installed the 6.5M1 version and the XML generation works correct (on windows). However, the problem still exits when 
you try to create a XSLT module and use the visual mapper. The visual mappers generates XPath for the mapping between 
two schemas. and when u try to map a element defined using "ref" attribute the XPath does not use the namespace where 
the element is defined. Rather it takes the namespace where the element is being referenced.

I am attaching a ZIP of the XSLTModule I tested. The setup is similar. 

Two schemas Person & Party. Party "refers" to an global element defined in Person schema. (both these are in namespace 
v1. 

I created another set of the same schemas but with namespace v2. i.e. PArty in v2 namespace refering to person in v2 
namespace.

With this setup, I create XML document for PArty schema and they correctly generated Person with the right namespace.

However, when u create a transformation service (and a XSLT file) the XPath for person is wrong.

e.g. in V1 schema the xpath for person should be
         "/v1ns0:aParty/v1ns1:aPerson" where v1ns1 correctly reflects the "Ref" namespace.
  instead it generates          "/v1ns0:aParty/v1ns0:aPerson" pointing to namespace of party instead of person.

I think the XSLT,XPath or mapper stuff also needs to be updated to corectly use the ref attribute.
Comment 1 svr_76 2008-07-15 01:49:27 UTC
Created attachment 64487 [details]
XSLT project to demonstrate wrong XPath (with wrong namespace prefix) when schemas use Ref attribute to refer to Global elements.
Comment 2 svr_76 2008-08-28 04:16:51 UTC
Not sure if this might be worked upon in the near future. But the XPath created by netbeans is different from the xml
document that netbeans generates from schemas. So the visual mapper functionality is broken.
Comment 3 Sergey Lunegov 2008-10-07 10:45:40 UTC
Vitaly, please look at this. If it doesn't take much time please fix it in NB 6.5. Otherwise mark it as WONTFIX.
Comment 4 Vitaly Bychkov 2008-10-14 00:48:11 UTC
This issue is about NB 6.5 only.
Fixed in main.
Changeset: 0a085c025481;
Comment 5 Quality Engineering 2008-10-14 18:20:16 UTC
Integrated into 'main-golden', will be available in build *200810141401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0a085c025481
User: lativ@netbeans.org
Log: #139967 - Wrong XPath (namespace) used when schemas used in XSLT use Ref attribute.
Comment 6 Alexander Permyakov 2009-12-07 09:51:16 UTC
verified