Namespace prefix ‘ref’ used but not declared in XML Publisher

Error

Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'ref' used but not declared.
	at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
	at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)

This Error generally due to higher BI Publisher versions.

If Word Properties of the XML Field has source something like ‘<?ref:xdo0040?>’ you will face this error

Solution

Make BI Publisher backward compatible.

 

Go to Options

options

Build -> Form field size  -> Set to Backward Compatible.

backward

 

 

Advertisements

XML Publisher Add On Not working in Office 2013 / Office 2016 / Office 365

If you are unable to add XML Publisher add-on to MS Word. Most Probably it is due to 32 bit version of Office.

Follow the below instructions.

Check your MS Office Bit version . MS Word -> File -> Account -> About Word

version

bitversion

If it is 32 bit version install 32 bit version of XML Publisher . Once you install 32 bit version It should automatically be visible on MS Word.

http://www.oracle.com/technetwork/middleware/bi-publisher/downloads/index.html

How to preserve Leading zeros in XML Publisher Excel Ouputs

In XML Pub Excel Reports excel removes the leading Zeros and prints the whole number. There are many instances where we need to print the zeros for eg item numbers starting with 0.

There are many ways to achieve this, one of the simple ways is to convert the number to character by adding space at the end.

concatenate two spaces after the xml tag as shown below in your template.

<?concat(<XMLTag>,’  ‘)?>

Downside of it is you will not be able to use excel features like sum , count etc on this specific column.