Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107291 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15620 invoked from network); 23 Sep 2019 10:05:42 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 23 Sep 2019 10:05:42 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 318132C052C for ; Mon, 23 Sep 2019 00:44:17 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,MIME_BOUND_DIGITS_15,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-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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:44:16 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id x4so15983330qtq.8 for ; Mon, 23 Sep 2019 00:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t9VG0SCUWsrfX7j0wcRDQYL83Imen3TTjJAa2UDG3Yk=; b=u+Ho8BOJRREEeBnoiasJNxio77XPo8skew4B753FBcv5ErMEaXixbaCi+FWSmFVNMJ /M77pruwiR0ikX7AfyyMUGR8w2ghqIKJVILjFLnexO4QJ6p1PTEKtilHbmi6Qg/Qo3ki hwlthAP0ObVbYcC6VkERlgROgUQl6mnD4erkey+pvmE3c4Wo/LDWlHsK2duZl9NnYAkW pEaU5mfGtzJpdxU1B6cyXgerJp0SG9Tmpnt9umc8kloPyZMX1mApITch77Qy5vJnyhrc 7012ie15dzb3wjaWOoQKPKpOiSR9lFdM3kktspdwMgRU52tu/H/w+Mo8TsFSL4HHGEKB ZSpA== 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=t9VG0SCUWsrfX7j0wcRDQYL83Imen3TTjJAa2UDG3Yk=; b=nvMiqhBRFa6l0UTxesGZpCXQhonvykosRHuKW4kLBqdg+nJUoH5kPXqqfd0GbuWRK7 hZgWjHTMju66a78dUi3rU5YXr98+5W9UwGBtW0p3k8CREYQwYO1pkbqf0vUKtLNSJtrg A2ArYsreu60HQBo3VTsVHMC7++aTSqZ445Y9PaFGYs6QbGWbuxr5U4akoXgBqAmH9t5M 0iiAnNfBYvX3jKHGfZOWRY6vkVWd1t0UCDqvaTOQBV2hzmGIruXGj7xAl96SzgXMzjnT ZBXVZI6HjzH0inS2j1K31tPUYzTgOS1Aqmi/mylZlSwPcJfhz/KUNp1FgEgRfXkYznQS OLLA== X-Gm-Message-State: APjAAAV768DK9xBciDaI6m+pWG0WO4TuOkFolpQ0bpDtICE18AnP7ttw y1Nxyy0AL8i5aNlVpCCNbOxMfVAbWeLy0yxw8KF6Cw== X-Google-Smtp-Source: APXvYqy1nJw56f7FeowAi5zDFSVssC2wf1aZAAl968h0NZw59n3iFKVDvJmwjg5JCk8rjWlPY0UhAWjktziwCT6PB54= X-Received: by 2002:ac8:42c9:: with SMTP id g9mr15469541qtm.74.1569224656186; Mon, 23 Sep 2019 00:44:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 23 Sep 2019 09:44:05 +0200 Message-ID: To: Gert Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000003480370593339678" X-Envelope-From: Subject: Re: [PHP-DEV] XML Validation From: kontakt@beberlei.de (Benjamin Eberlei) --0000000000003480370593339678 Content-Type: text/plain; charset="UTF-8" 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 > > --0000000000003480370593339678--