Yeah, you basically have a WIP right there. <smile/>
From: Blair Murri [mailto:os...@live.com]
Sent: Wednesday, February 5, 2014 8:42 PM
To: wix-devs@lists.sourceforge.net
Subject: Re: [WiX-devs] fixing bug 4264
I intend to add additional tables (XmlConfigNamespaces and XmlFileNamespaces)
to hold the namespaces, because more than one namespace will be needed for any
arbitrary XPath (including several I’ve needed in the past). The
XmlConfigNamespaces table will have a column that is a foreign key into the
XmlConfig table, a prefix, and a URI, while the XmlFileNamespaces table will
have a foreign key into the XmlFile table, although it could be done by just
adding a column that accepts null values. The problem with adding a column is
that because columns can be added at runtime, you can’t know that you won’t be
breaking someone by using the same column name as they are currently adding,
although there is no technical reason you couldn’t do that.
As to the authoring, I was going to add child XmlNamespace elements to the
XmlConfig and XmlFile elements where the XmlNamespace element has two
attributes: Prefix and URI. In the case of XmlConfig I was going to have
namespaces flow from one row to another whenever the ElementId attribute is
used.
If there are no entries in the XmlConfigNamespaces table for the particular row
in the XmlConfig table then the current behavior must be preserved. If any rows
are present then all XPath 1.0 rules are to be followed (which the current
behavior does NOT follow).
As to unit testing, we need to test both scenario sets: with and without any
namespaces added, for each action.
With namespaces scenarios needs to include the following tests: success case
where all data matches, success case where prefixes/namespaces exist that are
not found in the query, success case where multiple prefixes refer to the same
namespace, compile/runtime failure case where the same prefix is entered twice
for the same XmlConfig row, runtime failure case where a prefix is declared in
the XML “config” file is NOT provided in the XmlConfigNamespaces table and IS
used in the query (query MUST only use prefixes added to that table), although
that should happen anyway when we follow XPath rules (bonus points for failing
compile/link in this scenario). There may be other tests needed, I haven't
finished designing this feature yet.
Writing all this down, this is probably a good candidate for a WIP.
Blair
From: Sean Farrow<mailto:sean.far...@seanfarrow.co.uk>
Sent: Sunday, February 02, 2014 7:17 AM
To: wix-devs@lists.sourceforge.net<mailto:wix-devs@lists.sourceforge.net>
Hi All,
I am now in need to use namespaces with the XmlConfig action. Given this I am
looking to fix bug 4264.
I thought about adding an additional column to the XmlConfig table which would
hold the required namespace(s).
Is this going to be the best option?
Secondly, how should this be unit tested?
Any help/thoughts appreciated.
Cheers
Sean.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs