Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107292 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17385 invoked from network); 23 Sep 2019 10:08:32 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 23 Sep 2019 10:08:32 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id BC14B2CFDDF for ; Mon, 23 Sep 2019 00:47:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Mon, 23 Sep 2019 00:47:07 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id c6so17922460ioo.13 for ; Mon, 23 Sep 2019 00:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7OktXIK+bs99T5/jZZWALRnTpRPHuQq/BcxYapePRpo=; b=G8ovt7ofBdQbXXVGHzB7/lWA3QbMBCoEKqNNpuf+4ZSHwSnPJ07LkHaeuzx1JaMZ1C /dwRGZVy3QWhIvcbixTdE6YoEVQQCNngN0EYuCqNdCVCJ3ZF2MV/nG2cxjnQp27GXAT3 Vz/tH45HgmGJMRYesvRhv2v9nqIfr2Ruqjix5YxssXjwIGYM9IzrNRgecJXTv/pQaUok TZ78WgC1ZPb7Lioa7iJXzHP07MlGkurY0fpYVHbXaPlOMSppbJf1GSn9YorXL/lsPqG7 +TjQD9zqgnDckLnPv2OAgpwzegj3on92voGW8Mmk4kftm0I5KMINl6enqHzSgNTXk5qT hx0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7OktXIK+bs99T5/jZZWALRnTpRPHuQq/BcxYapePRpo=; b=P5kwtqZZVq7xMLUnoaOeVkrSuBKnQUbj+CLhbCThpIiIRG8ZRg6XjEkrxVmqnQPLQu YLrGh+gwVGvv1GynNtcB9alvubi1CikQAWm59NAKfKkfKEB0H5JCjD7ItRm080dahZYL MZcuXRlyYl3BeyjgJGiQsO9/P7nywvdsMBkxXR0o9MwxGPqvATjCPd092YqPdQdKjpHU gNskyrOwpGoN8U4Jdg0FIrXmD+UUECUin7LsI7hA3vQ1oRBpTk73xfu+Ih/UV0sTq6zg /91bBTdmO10+WtrlUyh4RusPv6zeXPTb6FG2GdjTL6ezS2lOo35v3lA/g5G3oIpqVUbW OniA== X-Gm-Message-State: APjAAAXbSdr7xpx9z0uLKTu4dzcBD9w4NAJSeOKwHxRUD8Unxk6toRQi XylOzg8+l5pobd4A/2VxfP3s5s6I4uLEFIEdFatXw/dN X-Google-Smtp-Source: APXvYqzeaBQC1qUpV56uNaBrd4v+R7hrlpTOQP8aGGLawrrlZVJy48LluE+MgpUfSd154hpjvoQxqq3TMJUFZHUCjXM= X-Received: by 2002:a6b:5f11:: with SMTP id t17mr13527101iob.169.1569224826676; Mon, 23 Sep 2019 00:47:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 23 Sep 2019 09:46:43 +0200 Message-ID: To: Benjamin Eberlei Cc: PHP internals Content-Type: text/plain; charset="UTF-8" X-Envelope-From: Subject: Re: [PHP-DEV] XML Validation From: gertp93@gmail.com (Gert) Is this something that would need an RFC? I'd be willing to take a shot at it myself, but my C experience is rather limited, so i'm not sure if i could cook up an implementation. On Mon, 23 Sep 2019 at 09:44, Benjamin Eberlei wrote: > > Hi Gert, > > On Mon, Sep 23, 2019 at 9:38 AM Gert wrote: >> >> Hi Internals, >> >> I've been working with XML and validation recently, and the Dom >> classes do basically everything that is needed. The only thing is that >> to get the errors of the schema validation we call the >> `validateSchema` on the DomDocument, and then use the >> `libxml_get_errors` function to actually get the errors. >> >> I'd like to propose either adding a flag to the `validateSchema` to >> make it throw an error detailing the actual XML errors, or adding a >> new function that validates and throws with all errors. >> >> I'd like to do the same with `schemaValidateSource` as well. >> >> Do you think this is something that should be added to PHP itself, or >> is it something that should be solved by third party packages? > > > this is something that should be added to PHP's dom classes, but the C development always takes longer than a userland library. > > If you please add a ticket on https://bugs.php.net, for this I will consider it for ext/dom, as I think it would be very useful for PHP 8 to go away from the warnings and libxml error handling approach to something better as you suggest. >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >>