Bypass namespace validation

  • Thread starter Thomas Guignard
  • Start date
T

Thomas Guignard

Hi there

I need to run an XSLT stylesheet on XML files generated by another app
that seem to have errors. When I try to run my XSLT processor (MSXML
engine, run through the Cooktop editor), I get the following error message

ERROR: pattern constraint failed.
The element: '{http://www.loc.gov/MARC21/slim}leader' has an invalid
value according to its data type.

Source: '<marc:record><marc:leader>01441cam a22003614a 45 0</marc:leader>'
Line: 14277, Pos: 53

Since I don't plan to use this field, I'd like to have the processor
bypass this error validation, so that I can get the rest to work.

How can I do this?

Thanks for any help
 
M

Martin Honnen

Thomas said:
I need to run an XSLT stylesheet on XML files generated by another app
that seem to have errors. When I try to run my XSLT processor (MSXML
engine, run through the Cooktop editor), I get the following error message

ERROR: pattern constraint failed.
The element: '{http://www.loc.gov/MARC21/slim}leader' has an invalid
value according to its data type.

Source: '<marc:record><marc:leader>01441cam a22003614a 45 0</marc:leader>'
Line: 14277, Pos: 53

Since I don't plan to use this field, I'd like to have the processor
bypass this error validation, so that I can get the rest to work.

You get validation errors when you run an XSLT transformation? If you
are using MSXML then you might be able to prevent it from doing
validation by setting
xmlDocument.validateOnParse = false
for the DOMDocuments you are using. Whether that is possible with
Cooktop I don't know.
 
T

Thomas Guignard

Thanks for your help. I can set run-time parameters in Cooktop, and now
it works.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,266
Members
46,865
Latest member
AveryHamme

Latest Threads

Top