this is a german Web-Mirror of MHONARC.ORG powered by Domainunion AG

xsl-list
[Top] [All Lists]

RE: [xsl] How to check an element's type against an XSD simpleType and skip that element if it does not conform to the simpleType?

2013-07-15 14:53:13
At 2013-07-15 19:41 +0000, Costello, Roger L. wrote:
>    test="string(bk:ISBN) instance of bk:ISBN-type">

Thanks Ken, I see what you're saying.

I gave that a try (I replaced data with string). Unfortunately, I get the same error message.

Are you getting that error message at the execution of the test (where you brought our focus in your post to the list), or is it associated with the loading of the source document? If the latter, you have to turn off schema validation on the loading of the document, otherwise, of course it won't be valid. You haven't protected the validation from happening selectively.

You can use input-type-annotations="strip" so that your input tree has no type information (and thus won't be constrained by the schema).

I hope this is what you need.

. . . . . . . . Ken


--
Public XSLT, XSL-FO, and UBL classes in the Netherlands     Oct 2013 |
Public XSLT, XSL-FO, UBL and code list classes in Australia Oct 2013 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: https://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd.            https://www.CraneSoftwrights.com/s/ |
G. Ken Holman                   mailto:gkholman(_at_)CraneSoftwrights(_dot_)com 
|
Google+ profile: https://plus.google.com/116832879756988317389/about |
Legal business disclaimers:    https://www.CraneSoftwrights.com/legal |


--~------------------------------------------------------------------
XSL-List info and archive:  https://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: https://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>