XSLT task fail rerouting

View: New views
3 Messages — Rating Filter:   Alert me  

XSLT task fail rerouting

by Madunic, Marijan (RBI-US) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've been looking at the attributes available to the XSLT task on do not
see an attribute to define what to do if the xslt task fails.

 

A bit of background first. Myself and a colleague are parsing 10s of
thousands of XML files and every now and then an ill formed XML doc
comes along. When this happens the entire process is terminated and we
would like for the process to continue and to move the offending file to
a directory to be parsed via tagsoup and then reparsed using the XSLT
task.

 

So my questions are:

 

Does the fail task work as a child of xslt?

If not what if anything can we do to stop the termination of the process
if an ill formed XML doc comes along?

 

Thanks, any ideas will be appreciated

 

Marijan (Mario) Madunic
Developer
Reed Business Information
604.412.2212 Direct - Vancouver

604.418.9327 Blackberry - Canada
marijan.madunic@...
<mailto:marijan.madunic@...@reedbusiness.com>
www.reedbusiness.com <http://www.reedbusiness.com/>  

 


Re: XSLT task fail rerouting

by Steve Loughran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Madunic, Marijan (RBI-US) wrote:

> I've been looking at the attributes available to the XSLT task on do not
> see an attribute to define what to do if the xslt task fails.
>
>  
>
> A bit of background first. Myself and a colleague are parsing 10s of
> thousands of XML files and every now and then an ill formed XML doc
> comes along. When this happens the entire process is terminated and we
> would like for the process to continue and to move the offending file to
> a directory to be parsed via tagsoup and then reparsed using the XSLT
> task.
>
>  
>
> So my questions are:
>
>  
>
> Does the fail task work as a child of xslt?
>
> If not what if anything can we do to stop the termination of the process
> if an ill formed XML doc comes along?

sounds like that is a bit of feature creep. If it is
xml-well-formedness, then <xmlvalidate> and its child <schemavalidate>
should do the work...what we want is for them to be able to create a
refid to all the validated files, which could then be used to validate
the components.  And a reference to all the invalid files to.

If such attrs existed you could go

<xmlvalidate validref="valid.xml" invalidref="invalid.xml">
  <fileset dir="xml" includes="**/*.html" />
</xmlvalidate>
<copy refid="valid.xml" destdir="build/xml/valid" />
<copy refid="invalid.xml" destdir="build/xml/tofix" />
...

Something to add as a feature request (better yet, with patches and
docs) to bugzilla

-steve


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: XSLT task fail rerouting

by Mario Madunic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Steve for the quick response. How do I post a feature request. I've
never used bugzilla and when I went to the site I found it a bit daunting.

I've found Antxtras that should be able to help. When I figure it out I'll post
it to the list.

Marijan (Mario) Madunic

Quoting Steve Loughran <stevel@...>:

> Madunic, Marijan (RBI-US) wrote:
> > I've been looking at the attributes available to the XSLT task on do not
> > see an attribute to define what to do if the xslt task fails.
> >
> >  
> >
> > A bit of background first. Myself and a colleague are parsing 10s of
> > thousands of XML files and every now and then an ill formed XML doc
> > comes along. When this happens the entire process is terminated and we
> > would like for the process to continue and to move the offending file to
> > a directory to be parsed via tagsoup and then reparsed using the XSLT
> > task.
> >
> >  
> >
> > So my questions are:
> >
> >  
> >
> > Does the fail task work as a child of xslt?
> >
> > If not what if anything can we do to stop the termination of the process
> > if an ill formed XML doc comes along?
>
> sounds like that is a bit of feature creep. If it is
> xml-well-formedness, then <xmlvalidate> and its child <schemavalidate>
> should do the work...what we want is for them to be able to create a
> refid to all the validated files, which could then be used to validate
> the components.  And a reference to all the invalid files to.
>
> If such attrs existed you could go
>
> <xmlvalidate validref="valid.xml" invalidref="invalid.xml">
>   <fileset dir="xml" includes="**/*.html" />
> </xmlvalidate>
> <copy refid="valid.xml" destdir="build/xml/valid" />
> <copy refid="invalid.xml" destdir="build/xml/tofix" />
> ...
>
> Something to add as a feature request (better yet, with patches and
> docs) to bugzilla
>
> -steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...

LightInTheBox - Buy quality products at wholesale price