Archive for the ‘Oracle XDK’ Category

XML documents should not be large

Wednesday, August 4th, 2004

XML.com: Decomposition, Process, Recomposition :-

So my first line of advice has always been: don’t go processing gigabyte files in XML formats. I have been working with XML for about 8 years. I have used XML in numerous ways with numerous tools for numerous purposes. I have never come across a natural need for an XML file more than a few megabytes. There may be terabytes of raw data in a system, but if you’re following XML (and classic data design) best practices, this should be structured into a number of files in some sensible way.

I’m saving this hear so I can remember where it is when one of my customers complains about poor performance or memory issues with the Oracle XDK.

It happens about once a month, and 9 times out of 10 they have huge XML files. The problem is that they don’t think they have a huge XML file and think 1Gb is a reasonable size, and give spurious arguments like “a powerful database like Oracle should be able to handle this much data”.

I have always told them that 1Mb is a more sensible limit, but have never been able to find a solid link to back myself up.

XSLProcessor.setParam

Tuesday, June 1st, 2004

The XSLProcessor.setParam(uri, name, value) allows you so set the value of a top-level stylesheet parameter.

The uri parameter is the namespace URI of the paramater name, which by the XSLT 1.0 specification is a qualified name.

That means that you can have:

    <xsl:stylesheet xmlns:foo="urn:foo" xmlns:bar="http://bar.com/params" ...>
    <xsl:param name="foo:param1"/>
    <xsl:param name="bar:param2"/>
    <xsl:param name="param3"/>

so the parameter names can be namespace-qualified, where the namespace prefix is a shortcut syntax for referring to the fully-specified namespace URI.

So, to set values for all three of these parameters above, you would do:

    xslProc.setParam("urn:foo","param1","'val1'");
    xslProc.setParam("http://bar.com/params","param2","'val2'");
    xslProc.setParam("","param3","'val3'");

The parameter value is expected to be a valid XPath expression (note that string literal values would therefore have to be explicitly quoted)

[Gleaned from mailing list email from Steve Muench and documentation]