|
next
|
Subject: Re: Loss of mapping lines in the mapper Author: Minollo I. Date: 18 Jul 2001 03:12 PM
|
>1) I have two files, the source has several namespace xmlns definitions,
>one anonymous and several with prefixes. When I map from the source to
>the destination and I get a line, but when I move to full source view I
>get an error as the xsl does not have the xmlns definitions that define
>the prefixes mentioned in the mapping, i.e. bat:batch/purchaseOrder, I
>need the stylesheet to have a definition for xmlns:bat but it is not
>there. So when I then try to move back to the mapper view I can't due to
>error. I then type in the xmlns:bat="..." and I can not move to the
>mapping view but no lines. If I redraw them the source gets duplicate
>mappings.
Mapper doesn't copy the namespaces from source document into XSLT in the
current version. we will file a PCR and fix this in next release.
The work around for now is just like what you described, manually add these
namespace into , we tried this and mapper successfully
reestablished the link between elements.
I would like to confirm with you for the following things:
1. did you copy the namespace into xsl:stylesheet element.
2. is your namespace identical with the namespace in your source code? Say
in your source document, the namespace is declared as xmlns:bat="xxx", you
need to copy it over in the stylesheet element.
If it still doesn't work, please send us your source xml, destination
xml as well as the XSLT where you manually added the namespace; that will
help us to find where the problem is.
>2) A further issue occurs in that in both the source and the destination a
>set of references are made to an anonymous namespace xmlns="..." however
>XSL can not handle this and needs to have a prefix assigned to this
>namespace so in the mapping we need xmlns:pre="..." where ... is lexically
>the same as the anonymous xmlsns definition. How do I get round this?
Can you provide us the stylesheet and xml files where you find this
limitation? We would like to understand if you are just having problem on
how XSLT handles the default namespace or if you are hitting a bug in how
we interpreted the specs...
In any case, I would limit the use of the default namespace in the
stylesheet to the http://www.w3.org/1999/XSL/Transform namespace, and
always prefix the nodes from the XML file with the proper prefix.
Thanks,
Song & Alberto
|
top
|
Subject: RE: Loss of mapping lines in the mapper Author: (Deleted User) Date: 20 Jul 2001 04:24 PM
|
Martin,
what's happening here is related with the default namespace in your source
document. if the default namesapce present in the source docuemnt, the xpath
"bat:Batch/PurchaseOrder/OrderHeader/RequestedDeliveryDate" will not be
recognized. this is the behavior in all the xsl processors we know( MSXSL,
Xalan...)
the right xapth should be
"bat:Batch/xxx:PurchaseOrder/xxx:OrderHeader/xxx:RequestedDeliveryDate"
which xxx should be decalred in the xslt and refer to the default namespace
in the source document. we'll fix mapper in later version to create the
right namesapce and xpath expression like that if the source document
contains default namespace.
before you get the next version which will fix this problem, the best thing
you can do now is to remove( or comment out) your default name space in the
source document. after doing that, everything will work fine. if you don't
want to remove that, you have to manually add the namespace for all the
xapth which is tedious...
thanks for reporting the problem and providing the test case.
song
> -----Original Message-----
> From: stylus-studio-tech Listmanager [mailto:listmanager]
> Sent: Friday, July 20, 2001 9:37 AM
> To: Recipients of 'stylus-studio-tech' suppressed
> Subject: RE: Loss of mapping lines in the mapper
>
>
> From: "song wang"
>
> Martin,
>
> thank you for your test case.
>
> we are looking into it now and will let you know as soon as possible.
>
> song
>
> > -----Original Message-----
> > From: stylus-studio-tech Listmanager [mailto:listmanager]
> > Sent: Friday, July 20, 2001 8:22 AM
> > To: Recipients of 'stylus-studio-tech' suppressed
> > Subject: Loss of mapping lines in the mapper
> >
> >
> > From: "Martin Roberts"
> >
> > Here is the scenario that causes the problem.
> > 1) Open build 47, verified by about box
> > 2) New XML mapping selected from new button
> > 3) Click choose source- selected file petexsltest.xml
> > 4) click choose destination - selected statusrequest.xml
> > 5) open sourcePurchaseOrder/Orderheader to show
> RequestedDeliveryDate
> > 6) Open dest orn:OrderNotificationHeader to show
> > orn:OrderNotificationRequestDate
> > 7) Map between these two date fields
> > 8) set do for each to false making sure passes value is true
> > 9) Click on full source
> > 10) Click on XML Mapper - will not appear - no error message
> > (not very helpful)
> > 11) Open source XML using the Open Scenario XML button.
> > 12) copy namespace definitions from PurchaseOrder element
> > 13) paste namespace definitions into stylesheet element
> > 14) click on XML mapper
> > 15) returned to mapper not mapping line shown.
> >
> > I hope this helps
> >
> >
> >
> > To reply: mailto:stylus-studio-tech.3339@edn.exceloncorp.com
> > To start a new topic: mailto:stylus-studio-tech@edn.exceloncorp.com
> > To login: http://edn.exceloncorp.com/~SSDN
> >
> >
>
>
> To reply: mailto:stylus-studio-tech.3342@edn.exceloncorp.com
> To start a new topic: mailto:stylus-studio-tech@edn.exceloncorp.com
> To login: http://edn.exceloncorp.com/~SSDN
>
>
|
|
|