Setting value of processor's href= attribute dynamically?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting value of processor's href= attribute dynamically?

Pascal Heus
I'm struggling with a simple problem related to the schema validation
processor
I need to dynamically set the schema input element.
I know I can could grab the schema .xsd file and copy its content in the
<p:input name="schema"> element. However, since the schema I'm working
with imports other external .xsd files, it probably won't work unless
these are in the same folder as the xpl file (which I want to avoid).
What I'm trying to do is to set the value of the href="" at execution
time but, since it's a "text" attribute, I can't seem to find a way to
do that. The location of the schema is in an config.xml file. I tried
something like #config#xpointer(/my/schema/location) but this returns
the xml element, not the element text content. I guess there is a simple
way or trick to do that, any suggestion would be appreciated.
thanks
Pascal

    <p:processor name="oxf:validation">
        <p:input name="config">
            <config>
                 <decorate>true</decorate>
            </config>
        </p:input>
        <p:input name="schema" href="oxf:/dynamic/reference/to/schema.xsd"/>
        <p:input name="data" href="#file-content"/>
        <p:output name="data" id="validated-document"/>
    </p:processor>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Setting value of processor's href= attribute dynamically?

Stephen Bayliss
I would suggest you use something like a URL Generator processor to grab
the schema input (and maybe an XSLT processor to provide the config
input for the URL generator, this processor could retrieve the schema
file name from your config file).

Then, if the data output of the URL Generator is something like
<p:output name="data" id="the-schema"/> you can use <p:input
name="schema" href="#the-schema"/> for your validation processor.

Steve



-----Original Message-----
From: Pascal Heus [mailto:[hidden email]]
Sent: 19 March 2006 12:56
To: [hidden email]
Subject: [ops-users] Setting value of processor's href= attribute
dynamically?

I'm struggling with a simple problem related to the schema validation
processor
I need to dynamically set the schema input element.
I know I can could grab the schema .xsd file and copy its content in the
<p:input name="schema"> element. However, since the schema I'm working
with imports other external .xsd files, it probably won't work unless
these are in the same folder as the xpl file (which I want to avoid).
What I'm trying to do is to set the value of the href="" at execution
time but, since it's a "text" attribute, I can't seem to find a way to
do that. The location of the schema is in an config.xml file. I tried
something like #config#xpointer(/my/schema/location) but this returns
the xml element, not the element text content. I guess there is a simple
way or trick to do that, any suggestion would be appreciated.
thanks
Pascal

    <p:processor name="oxf:validation">
        <p:input name="config">
            <config>
                 <decorate>true</decorate>
            </config>
        </p:input>
        <p:input name="schema"
href="oxf:/dynamic/reference/to/schema.xsd"/>
        <p:input name="data" href="#file-content"/>
        <p:output name="data" id="validated-document"/>
    </p:processor>





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Setting value of processor's href= attribute dynamically?

Pascal Heus
Many thanks Steve. That works very well.
<p/>

Stephen Bayliss wrote:
I would suggest you use something like a URL Generator processor to grab
the schema input (and maybe an XSLT processor to provide the config
input for the URL generator, this processor could retrieve the schema
file name from your config file).

Then, if the data output of the URL Generator is something like
<p:output name="data" id="the-schema"/> you can use <p:input
name="schema" href="#the-schema"/> for your validation processor.

Steve



-----Original Message-----
From: Pascal Heus [[hidden email]] 
Sent: 19 March 2006 12:56
To: [hidden email]
Subject: [ops-users] Setting value of processor's href= attribute
dynamically?

I'm struggling with a simple problem related to the schema validation
processor
I need to dynamically set the schema input element.
I know I can could grab the schema .xsd file and copy its content in the
<p:input name="schema"> element. However, since the schema I'm working
with imports other external .xsd files, it probably won't work unless
these are in the same folder as the xpl file (which I want to avoid).
What I'm trying to do is to set the value of the href="" at execution
time but, since it's a "text" attribute, I can't seem to find a way to
do that. The location of the schema is in an config.xml file. I tried
something like #config#xpointer(/my/schema/location) but this returns
the xml element, not the element text content. I guess there is a simple
way or trick to do that, any suggestion would be appreciated.
thanks
Pascal

    <p:processor name="oxf:validation">
        <p:input name="config">
            <config>
                 <decorate>true</decorate>
            </config>
        </p:input>
        <p:input name="schema"
href="oxf:/dynamic/reference/to/schema.xsd"/>
        <p:input name="data" href="#file-content"/>
        <p:output name="data" id="validated-document"/>
    </p:processor>



  

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws