Re: Using CatalogManager

Mansour Al Akeel <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <CAFvvX=adE-gMH=WDigaQXKTN84ViATLq3bhvFOmBKRX+jF8SxQ@mail.gmail.com>
Still no luck, so decided to dig in the source to see if anything can be
done. And got stuck again,

In XSLTTransformer.java:

    @Override
    public void setConfiguration(final Map<String, ? extends Object>
configuration) {
        try {
            this.url = (URL) configuration.get(SOURCE);
        } catch (ClassCastException cce) {
            throw new SetupException(
                    "The configuration value of '" + SOURCE + "' can't be
cast to " + URL.class.getName(), cce);
        }

        if (this.url == null) {
            LOG.debug("Impossible to load XSLT parameters from null
source");
        } else {
            final Object attributesObj = configuration.get("attributes");
            if (attributesObj instanceof Map) {
                @SuppressWarnings("unchecked")
                final Map<String, Object> attributesMap = (Map<String,
Object>) attributesObj;
                this.load(this.url, attributesMap);
            } else {
                this.load(this.url, null);
            }
        }

        this.setParameters(configuration);
    }


The attributes object is passed to load(url, attributesMap). Then in that
method it's passed to the tranformer factory. The question is how can I set
this "attribute" configuration to the map of parameters I need ??
For example:

<map:transform src="path/to/my.xsl" /> doesn't not take "attributes".


If there's a better way to get this catalog business moving, it will be
highly appreciated.

Thank you.





On Thu, May 9, 2013 at 10:58 AM, Mansour Al Akeel <[email protected]
> wrote:

> With C3.0-beta, I am trying to use CatalogManager.properties to direct
> request of a DTD to another location.
> I copied the files CatalogManager.properties, catalog.xml, dummy.dtd to
>
> src/main/resources and then to rcl-config/WEB-INF/classes, but not luck.
>
> Is there anything I can do to get the requests to a DTD to be server
> through the catalog ??
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.