From 96e568fe543bc0d8270f664fd4f9601c459e0b89 Mon Sep 17 00:00:00 2001 From: Jonas Zaugg Date: Mon, 23 Oct 2023 23:06:20 +0200 Subject: [PATCH 1/5] Create CISG-Online.js --- CISG-Online.js | 370 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 CISG-Online.js diff --git a/CISG-Online.js b/CISG-Online.js new file mode 100644 index 0000000000..5687c418e3 --- /dev/null +++ b/CISG-Online.js @@ -0,0 +1,370 @@ +{ + "translatorID": "045d1f03-d17b-4437-9290-d3a4203c4cbc", + "label": "CISG-Online", + "creator": "Jonas Zaugg", + "target": "^https?://cisg-online.org/search-for-cases", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2023-10-23 21:05:55" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2023 Jonas Zaugg + + This file is part of Zotero. + + Zotero is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Zotero is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with Zotero. If not, see . + + ***** END LICENSE BLOCK ***** +*/ + + +function detectWeb(doc, url) { + // TODO: adjust the logic here + if (url.includes('caseId=')) { + return 'case'; + } + else if (url.includes('search-for-cases')) { + // Only present on search form, not on top 50 pages + let searchResultsContainer = doc.querySelector('div#searchCaseResult'); + if (searchResultsContainer) Z.monitorDOMChanges(searchResultsContainer); + if (getSearchResults(doc, true)) { + return 'multiple'; + } + } + return false; +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + let selector = 'div.search-result div.col-md-10 a.search-result-link'; + var rows = doc.querySelectorAll(selector); + for (let row of rows) { + // TODO: check and maybe adjust + let href = row.href; + // TODO: check and maybe adjust + let title = ZU.trimInternal(row.textContent); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + return found ? items : false; +} + +async function doWeb(doc, url) { + if (detectWeb(doc, url) == 'multiple') { + let items = await Zotero.selectItems(getSearchResults(doc, false)); + if (!items) return; + for (let url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } + } + else { + await scrape(doc, url); + } +} + +function getRow(doc, sectionName, rowName) { + // the :not selector is to avoid selecting the drop-down rows + let selector = `div.${sectionName}-rows div.row:not([data-has-content]):not([data-is-content])`; + let rows = doc.querySelectorAll(selector); + let result; + for (let row of rows.values()) { + if (row.textContent.includes(rowName)) return row.children[1]; + } + return result; +} + +function getRowText(doc, sectionName, rowName) { + let row = getRow(doc, sectionName, rowName); + return row ? ZU.trimInternal(row.textContent) : ""; +} + +// For sellers, buyers, claimants, respondants (sic) but not history +function getDataBlock(doc, contentName, heading) { + let blocks = doc.querySelectorAll(`div[data-is-content='${contentName}'] div.is-content`); + let result = []; + for (let block of blocks.values()) { + // TODO: check fragility + let lines = block.querySelectorAll("div.row > div > div.row"); + let formattedBlock = Array.from(lines.values()).map(function (line) { + let lineElements = Array.from(line.children).map(c => ZU.trimInternal(c.textContent)); + let value = `${lineElements[0]}: ${lineElements[1]}`; + return value; + }).map(line => "\t- " + line) + .join("\n"); + result.push(formattedBlock); + } + return result.map(s => `- ${heading}\n${s}`).join("\n"); +} + +function getInfoBlock(doc, sectionName) { + let info = doc.querySelectorAll(`div.${sectionName}-rows > div.row:not([data-has-content]):not([data-is-content])`); + return Array.from(info).map(function (node) { + return Array.from(node.querySelectorAll("div")).map(blob => ZU.trimInternal(blob.textContent)).join(": "); + }).map(line => "- " + line) + .join("\n"); +} + +// Takes a string of judge names (with role in brackets) and returns a list of authors +/*function judgeCleanup(judges) { + return judges.split(", ").map(function (judge) { + let cleanJudge = judge.replace(/\s?\([^)]*\)/, ''); + return ZU.cleanAuthor(cleanJudge, 'author', false); + }); +}*/ + +async function scrape(doc, url = doc.location.href) { + // General + let eprint = getRowText(doc, "general-information", "CISG-online number"); + let caseName = getRowText(doc, "general-information", "Case name"); + let tribunal = getRowText(doc, "general-information", "Arbitral Tribunal"); + let court = getRowText(doc, "general-information", "Court"); + let jurisdiction = getRowText(doc, "general-information", "Jurisdiction"); + let judges = getRowText(doc, "general-information", "Judge"); // Also for Judges + let seat = getRowText(doc, "general-information", "Seat of the arbitration"); + let date = getRowText(doc, "general-information", "Date of decision"); + let docket = getRowText(doc, "general-information", "Case nr./docket nr."); + let claimants = getDataBlock(doc, "claimants", "Claimant"); + let respondents = getDataBlock(doc, "respondants", "Respondent"); // sic + // +Chamber + // +Case History + + // Contract + let contractInfo = getInfoBlock(doc, "contract-information"); + let sellers = getDataBlock(doc, "sellers", "Seller"); + let buyers = getDataBlock(doc, "buyers", "Buyer"); + if (sellers) contractInfo += "\n" + sellers; + if (buyers) contractInfo += "\n" + buyers; + + // Decision information and comment + let decisionInfo = getInfoBlock(doc, "decision-information"); + // TODO: add cited cisg-online cases + let comment = getInfoBlock(doc, "comment"); + + let caseFile = doc.querySelector("div[data-is-content='fullTextTranslationFiles'] div.is-content-cases div.row"); + let caseFileName = caseFile ? ZU.trimInternal(caseFile.textContent) : ""; + let caseFileURL = caseFile ? caseFile.querySelector("a").href : ""; + + var item = new Z.Item('case'); + + item.caseName = caseName; + item.court = court ? court : tribunal; + item.country = jurisdiction ? jurisdiction : seat; + item.dateDecided = date; + item.docketNumber = docket; + item.cisgOnline = eprint; + + //if (judges) judgeCleanup(judges).forEach(j => item.creators.push(j)); + + if (caseFileName && caseFileURL) { + item.attachments.push({ + title: caseFileName, + mimeType: "application/pdf", + url: caseFileURL + }); + } + + item.attachments.push({ + url: url, + title: "CISG-Online Link", + mimeType: "text/html", + snapshot: false + }); + + // Building abstract + let abstract = ""; + if (judges || claimants || respondents) { + abstract += "## General information:\n"; + if (claimants) abstract += claimants + "\n"; + if (respondents) abstract += respondents + "\n"; + if (judges) abstract += "- Judge(s): " + judges + "\n"; + abstract += "\n"; + } + abstract += "## Decision information:\n" + decisionInfo + "\n"; + if (contractInfo || sellers || buyers) abstract += "\n## Contract information:\n" + contractInfo + "\n"; + if (comment) abstract += "\n## Comment:\n" + comment; + //Z.debug(abstract) + item.abstractNote = abstract; + + item.complete(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases?caseId=14425", + "items": [ + { + "itemType": "case", + "caseName": "Brands International Corporation v. Reach Companies, LLC", + "creators": [], + "dateDecided": "02 October 2023", + "abstractNote": "## General information:\n- Claimant\n\t- Name: Brands International Corporation\n\t- Place of business: Canada\n\t- Role in transaction: Seller\n- Respondent\n\t- Name: Reach Companies, LLC\n\t- Place of business: USA\n\t- Role in transaction: Buyer\n- Judge(s): John R. Tunheim (District Judge)\n\n## Decision information:\n- CISG applicable: yes, agreement of the parties\n- CISG applied: yes\n- (Domestic) law applied in addition: Minnesota law\n- Key CISG provisions interpreted and applied: Art. 74; Art. 78\n- Non-provision-specific issues addressed: Recoverability of attorneys' fees as damages\n\n## Contract information:\n- Category of goods: 54: Medicinal and pharmaceutical products\n- Goods as per contract: 3,696,766 units of hand sanitizer\n- Price: 89'072.64 USD (U.S. Dollar)\n- Seller\n\t- Name: Brands International Corporation\n\t- Place of business: Canada\n\t- Role in trade: Manufacturer of the goods sold\n- Buyer\n\t- Name: Reach Companies, LLC\n\t- Place of business: USA\n\t- Role in trade: Distributor", + "court": "U.S. District Court for the District of Minnesota", + "docketNumber": "21-1026 (JRT/DLM)", + "attachments": [ + { + "title": "Full text of decision Original language: English", + "mimeType": "application/pdf" + }, + { + "title": "CISG-Online Link", + "mimeType": "text/html", + "snapshot": false + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases", + "items": "multiple" + }, + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases/50-most-recently-added-cases", + "items": "multiple" + }, + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases?caseId=14276", + "items": [ + { + "itemType": "case", + "caseName": "Alcala v. Verbruggen Palletizing Solutions, Inc.", + "creators": [], + "dateDecided": "14 June 2023", + "abstractNote": "## General information:\n- Judge(s): G. Richard Bevan (Presiding Judge), Robyn Brody (Reporting judge), Colleen Zahn (Judge), Gregory W. Moeller (Judge), John Stegner (Judge)\n\n## Decision information:\n- (Domestic) law applied in addition: Wisconsin law\n- Non-provision-specific issues addressed: Personal injury (allegedly) caused by goods sold under CISG contract\n\n## Comment:\n- Editorial remark: []The only reference to the CISG is found in para. 71 of the decision:\"Fourth, the governing law clause in the Equipment Contract states it «shall be governed and construed according to» the laws of the «State of Wisconsin» and not the provisions of the United Nations Convention on Contracts for the International Sale of Goods («C.I.S.G.»). From the inclusion of this clause, it is reasonable to infer that because this transaction involved a foreign manufacturer (VE) and its United States affiliate (VPS) – the parties cautioned against application of the C.I.S.G. with the understanding that the Equipment Contract was predominantly for the sale of goods. See Fercus, S.R.L. v. Palazzo, No. 98 CIV 7728 (BRB), 2000 WL 1118925, at *3 (S.D.N.Y. Aug. 8, 2000) (explaining that the C.I.S.G. applies when, inter alia, contracting parties have places of business in different nations and the contract omits a choice of law provision).\"[...]", + "court": "Supreme Court of the State of Idaho", + "docketNumber": "49473, 49474", + "attachments": [ + { + "title": "Full text of decision Original language: English", + "mimeType": "application/pdf" + }, + { + "title": "CISG-Online Link", + "mimeType": "text/html", + "snapshot": false + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases?caseId=6714", + "items": [ + { + "itemType": "case", + "caseName": "Organic barley case", + "creators": [], + "dateDecided": "13 November 2002", + "abstractNote": "## General information:\n- Claimant\n\t- Place of business: Belgium\n\t- Role in transaction: Buyer\n- Respondent\n\t- Place of business: Germany\n\t- Role in transaction: Seller\n- Judge(s): Prof. Dr. Motzke (Presiding Judge), von Hofer (Judge), Dr. Ermer (Judge)\n\n## Decision information:\n- CISG applicable: yes, Art. 1(1)(a)\n- Key CISG provisions applied: Art. 35(1); Art. 39(1)\n- CISG provisions also cited: Art. 30; Art. 34; Art. 44\n\n## Contract information:\n- Category of goods: 4: Cereals and cereal preparations\n- Goods as per contract: Organic barley\n- Seller\n\t- Place of business: Germany\n- Buyer\n\t- Place of business: Belgium\n\n## Comment:\n- European Case Law Identifier (ECLI): ECLI:DE:OLGMUEN:2002:1113.27U346.02.0A\n- Case identifier in the old Albert H. Kritzer Database: 021113g1", + "court": "Oberlandesgericht München (Court of Appeal Munich)", + "docketNumber": "27 U 346/02", + "attachments": [ + { + "title": "Full text of decision Original language: German", + "mimeType": "application/pdf" + }, + { + "title": "CISG-Online Link", + "mimeType": "text/html", + "snapshot": false + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases?caseId=7035", + "items": [ + { + "itemType": "case", + "caseName": "Dioctyl phthalate case", + "creators": [], + "dateDecided": "16 August 1996", + "abstractNote": "## General information:\n- Claimant\n\t- Place of business: China\n\t- Role in transaction: Seller\n- Respondent\n\t- Place of business: Korea, Republic of (South Korea)\n\t- Role in transaction: Buyer\n\n## Decision information:\n- CISG applicable: yes, Art. 1(1)(a) and parties' agreement\n- CISG applied: yes\n- Key CISG provisions applied: Art. 74; Art. 75; Art. 77; Art. 78\n- CISG provisions also cited: Art. 18; Art. 35\n\n## Contract information:\n- Category of goods: 51: Organic chemicals\n- Goods as per contract: 768 tons of DOP (dioctyl phthalate)\n- Price: 1'551'360.00 USD (U.S. Dollar)\n- Seller\n\t- Place of business: China\n- Buyer\n\t- Place of business: Korea, Republic of (South Korea)\n\n## Comment:\n- Case identifier in the old Albert H. Kritzer Database: 960730c1", + "court": "China International Economic & Trade Arbitration Commission (CIETAC)", + "docketNumber": "CISG/1996/39", + "attachments": [ + { + "title": "Translation of decision Language: English", + "mimeType": "application/pdf" + }, + { + "title": "CISG-Online Link", + "mimeType": "text/html", + "snapshot": false + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases?caseId=8138", + "items": [ + { + "itemType": "case", + "caseName": "MSS, Inc. v. Maser Corp.", + "creators": [], + "dateDecided": "18 July 2011", + "abstractNote": "## General information:\n- Claimant\n\t- Name: MSS, Inc.\n\t- Place of business: USA\n\t- Role in transaction: Seller\n- Respondent\n\t- Name: Maser Corporation\n\t- Place of business: USA\n\t- Role in transaction: Buyer\n- Judge(s): John T. Nixon (Sole judge)\n\n## Decision information:\n- CISG applicable: left open\n- CISG applied: no, the present decision deals only with the validity of a contractual limitation of liability clause and therefore a matter not governed by the CISG\n- (Domestic) law applied in addition: Tennessee law\n- Key CISG provisions applied: Art. 4\n- CISG provisions also cited: Art. 1(1)(a)\n- Relevant CISG provisions not cited: Art. 10\n\n## Contract information:\n- Category of goods: 72: Machinery specialized for particular industries\n- Goods as per contract: Metalsort machine for the sorting of plastics and metals for material recovery and recycling\n- Seller\n\t- Name: MSS, Inc.\n\t- Place of business: USA\n- Buyer\n\t- Name: Maser Corporation\n\t- Place of business: USA\n- Buyer\n\t- Name: Maser Canada Inc.\n\t- Place of business: Canada\n\n## Comment:\n- Editorial remark by Ulrich G. Schroeter: In the present case, it was disputed whether the sales contract with the U.S. seller MSS, Inc. had been concluded by Maser, Corp. (based in the U.S.) as buyer (meaning that it was a domestic sales contract to which the CISG would not be applicable), or with its wholly-owned subsidiary Maser Canada, Inc. (meaning that it was an international sales contract governed by the CISG in accordance with Art. 1(1)(a)). The Court left the question open and held that the question to be determined by the present order - the validity of a limitation of liability clause found in the contract - was in any case not governed by the CISG, but only by domestic law.\n- Case identifier in the old Albert H. Kritzer Database: 110718u1", + "court": "U.S. District Court for the District of Maryland", + "docketNumber": "3:09-cv-00601", + "attachments": [ + { + "title": "Full text of decision Original language: English", + "mimeType": "application/pdf" + }, + { + "title": "CISG-Online Link", + "mimeType": "text/html", + "snapshot": false + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From 2ff36eac8778d175ec7359abec1cce06b62cdf2a Mon Sep 17 00:00:00 2001 From: Jonas Zaugg Date: Fri, 27 Oct 2023 02:44:01 +0200 Subject: [PATCH 2/5] Refactoring Instead of filling the abstract, info is now saved as formatted notes. Now supports downloading multiple PDF attachments. Parsing logic cleaned up by avoiding trailing array functions. --- CISG-Online.js | 375 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 281 insertions(+), 94 deletions(-) diff --git a/CISG-Online.js b/CISG-Online.js index 5687c418e3..9fa85c2ad2 100644 --- a/CISG-Online.js +++ b/CISG-Online.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-10-23 21:05:55" + "lastUpdated": "2023-10-27 00:42:14" } /* @@ -83,6 +83,17 @@ async function doWeb(doc, url) { } } +// Turns a two-item row into a formatted label/value pair +function labellize(row) { + let segments = row.querySelectorAll("div"); + if (segments.length != 2) { + Z.debug("Row does not contain exactly 2 elements but " + segments.length); + return null; + } + + return "" + ZU.trimInternal(segments[0].textContent) + ": " + ZU.trimInternal(segments[1].textContent); +} + function getRow(doc, sectionName, rowName) { // the :not selector is to avoid selecting the drop-down rows let selector = `div.${sectionName}-rows div.row:not([data-has-content]):not([data-is-content])`; @@ -99,30 +110,122 @@ function getRowText(doc, sectionName, rowName) { return row ? ZU.trimInternal(row.textContent) : ""; } -// For sellers, buyers, claimants, respondants (sic) but not history -function getDataBlock(doc, contentName, heading) { - let blocks = doc.querySelectorAll(`div[data-is-content='${contentName}'] div.is-content`); - let result = []; +// For sellers, buyers, claimants, respondents but not history +function getDataBlock(doc, selector, label) { + let blocks = doc.querySelectorAll(`div[data-is-content='${selector}'] div.is-content`); + + if (!blocks.length) return null; + + let result = ""; for (let block of blocks.values()) { + result += `

${label}

    `; // TODO: check fragility - let lines = block.querySelectorAll("div.row > div > div.row"); - let formattedBlock = Array.from(lines.values()).map(function (line) { - let lineElements = Array.from(line.children).map(c => ZU.trimInternal(c.textContent)); - let value = `${lineElements[0]}: ${lineElements[1]}`; - return value; - }).map(line => "\t- " + line) - .join("\n"); - result.push(formattedBlock); + let rows = block.querySelectorAll("div.row > div > div.row"); + for (let row of rows.values()) result += `
  • ${labellize(row)}
  • `; + result += "
\n"; + } + Z.debug(result); + return result; +} + +// For sellers, buyers, claimants, respondents but not history +function getCaseHistory(doc) { + let cases = doc.querySelectorAll(`div[data-is-content='history'] div.is-content-history`); + if (!cases.length) return null; + + let result = "

Case History

    "; + for (let cisgCase of cases.values()) { + //result += `
  • ${labellize(row)}
  • `; + if (cisgCase.classList.contains('is-this-case')) result += "
  • Present decision
  • "; + else { + let caseName = ZU.trimInternal(text(cisgCase, 'div.row')); + let caseID = cisgCase.getAttribute('id').replace('searchCaseRow_', ''); + let caseURL = `https://cisg-online.org/search-for-cases?caseId=${caseID}`; + result += `
  • ${caseName}
  • `; + } + } + result += "
\n"; + Z.debug(result); + return result; +} + +function getInfoBlock(doc, selector, label) { + let rows = doc.querySelectorAll(`div.${selector}-rows > div.row:not([data-has-content]):not([data-is-content])`); + if (!rows.length) return null; + + let result = `

${label}

    `; + for (let row of rows.values()) result += `
  • ${labellize(row)}
  • `; + result += "
"; + return result; +} + +function getContentCases(doc, selector) { + return doc.querySelectorAll(`div[data-is-content='${selector}'] div.is-content-cases`); +} + +function addPDFs(doc, item) { + // Decision or abstract in PDF + let caseFiles = getContentCases(doc, 'fullTextTranslationFiles'); + for (let caseFile of caseFiles.values()) { + let caseFileName = ZU.trimInternal(caseFile.textContent); + Z.debug("Adding case file: " + caseFileName); + let caseFileAnchor = caseFile.querySelector("a"); + if (caseFileAnchor) { + item.attachments.push({ + title: caseFileName, + mimeType: "application/pdf", + url: caseFileAnchor.href + }); + } + } +} + +function getCISGCases(doc, selector, label) { + let cases = getContentCases(doc, selector); + Z.debug(`${label} ${cases.length} CISG-Online decisions.`); + if (!cases.length) return null; + + let note = `

${label} ${cases.length} case(s)

    `; + + for (let cisgCase of cases.values()) { + let caseName = ZU.trimInternal(text(cisgCase, 'div.row')); + let caseID = cisgCase.getAttribute('id').replace('searchCaseRow_', ''); + let caseURL = `https://cisg-online.org/search-for-cases?caseId=${caseID}`; + note += `
  • ${caseName}
  • `; + } + + note += "
"; + return note; +} + +function getCommentExtras(doc, item, selector, label) { + let extras = getContentCases(doc, selector); + if (!extras.length) return null; + + let note = `

${label}

    `; + for (let extra of extras.values()) { + let extraText = ZU.trimInternal(extra.textContent); + let extraAnchor = extra.querySelector("a"); + + if (extraAnchor) { + note += `
  • ${extraText}
  • `; + item.attachments.push({ + title: label, + mimeType: "application/pdf", + url: extraAnchor.href + }); + } + else { + note += `
  • ${extraText}
  • `; + } } - return result.map(s => `- ${heading}\n${s}`).join("\n"); + + note += "
"; + return note; } -function getInfoBlock(doc, sectionName) { - let info = doc.querySelectorAll(`div.${sectionName}-rows > div.row:not([data-has-content]):not([data-is-content])`); - return Array.from(info).map(function (node) { - return Array.from(node.querySelectorAll("div")).map(blob => ZU.trimInternal(blob.textContent)).join(": "); - }).map(line => "- " + line) - .join("\n"); +function addNote(item, note) { + if (note) item.notes.push({ note: note }); } // Takes a string of judge names (with role in brackets) and returns a list of authors @@ -146,24 +249,19 @@ async function scrape(doc, url = doc.location.href) { let docket = getRowText(doc, "general-information", "Case nr./docket nr."); let claimants = getDataBlock(doc, "claimants", "Claimant"); let respondents = getDataBlock(doc, "respondants", "Respondent"); // sic + let caseHistory = getCaseHistory(doc); // +Chamber - // +Case History // Contract - let contractInfo = getInfoBlock(doc, "contract-information"); + let contractInfo = getInfoBlock(doc, 'contract-information', 'Contract information'); let sellers = getDataBlock(doc, "sellers", "Seller"); let buyers = getDataBlock(doc, "buyers", "Buyer"); - if (sellers) contractInfo += "\n" + sellers; - if (buyers) contractInfo += "\n" + buyers; + if (sellers) contractInfo += sellers; + if (buyers) contractInfo += buyers; - // Decision information and comment - let decisionInfo = getInfoBlock(doc, "decision-information"); - // TODO: add cited cisg-online cases - let comment = getInfoBlock(doc, "comment"); - - let caseFile = doc.querySelector("div[data-is-content='fullTextTranslationFiles'] div.is-content-cases div.row"); - let caseFileName = caseFile ? ZU.trimInternal(caseFile.textContent) : ""; - let caseFileURL = caseFile ? caseFile.querySelector("a").href : ""; + // Decision info and comment + let decisionInfo = getInfoBlock(doc, 'decision-information', 'Decision information'); + let comment = getInfoBlock(doc, 'comment', 'Comments'); var item = new Z.Item('case'); @@ -172,39 +270,41 @@ async function scrape(doc, url = doc.location.href) { item.country = jurisdiction ? jurisdiction : seat; item.dateDecided = date; item.docketNumber = docket; - item.cisgOnline = eprint; + item["CISG-Online"] = eprint; //if (judges) judgeCleanup(judges).forEach(j => item.creators.push(j)); - if (caseFileName && caseFileURL) { - item.attachments.push({ - title: caseFileName, - mimeType: "application/pdf", - url: caseFileURL - }); - } + // Add decision information and comments + addNote(item, decisionInfo); + comment = comment ? comment : "

Comments

"; + let publishedIn = getCommentExtras(doc, item, 'publishedIn', 'Decision published in'); + if (publishedIn) comment += publishedIn; + let decisionComments = getCommentExtras(doc, item, 'decisionComments', 'Comment(s) on this decision'); + if (decisionComments) comment += decisionComments; + addNote(item, comment); - item.attachments.push({ - url: url, - title: "CISG-Online Link", - mimeType: "text/html", - snapshot: false - }); + // Add notes for CISG-Online cases that this case cites or where this case is cited + addNote(item, getCISGCases(doc, 'citedCISGs', 'Cites')); + addNote(item, getCISGCases(doc, 'citedBY', 'Cited by')); + + // Add all abstracts and full-text PDFs + addPDFs(doc, item); - // Building abstract - let abstract = ""; - if (judges || claimants || respondents) { - abstract += "## General information:\n"; - if (claimants) abstract += claimants + "\n"; - if (respondents) abstract += respondents + "\n"; - if (judges) abstract += "- Judge(s): " + judges + "\n"; - abstract += "\n"; + item.url = url; + + //item.notes.push({ note: decisionInfo }); + + // General information + if (judges || claimants || respondents || caseHistory) { + let generalInfo = "

General information

"; + if (claimants) generalInfo += claimants + "\n"; + if (respondents) generalInfo += respondents + "\n"; + if (judges) generalInfo += "

Judge(s)

" + judges + "\n"; + if (caseHistory) generalInfo += caseHistory + "\n"; + addNote(item, generalInfo); } - abstract += "## Decision information:\n" + decisionInfo + "\n"; - if (contractInfo || sellers || buyers) abstract += "\n## Contract information:\n" + contractInfo + "\n"; - if (comment) abstract += "\n## Comment:\n" + comment; - //Z.debug(abstract) - item.abstractNote = abstract; + + if (contractInfo || sellers || buyers) addNote(item, contractInfo); item.complete(); } @@ -220,31 +320,37 @@ var testCases = [ "caseName": "Brands International Corporation v. Reach Companies, LLC", "creators": [], "dateDecided": "02 October 2023", - "abstractNote": "## General information:\n- Claimant\n\t- Name: Brands International Corporation\n\t- Place of business: Canada\n\t- Role in transaction: Seller\n- Respondent\n\t- Name: Reach Companies, LLC\n\t- Place of business: USA\n\t- Role in transaction: Buyer\n- Judge(s): John R. Tunheim (District Judge)\n\n## Decision information:\n- CISG applicable: yes, agreement of the parties\n- CISG applied: yes\n- (Domestic) law applied in addition: Minnesota law\n- Key CISG provisions interpreted and applied: Art. 74; Art. 78\n- Non-provision-specific issues addressed: Recoverability of attorneys' fees as damages\n\n## Contract information:\n- Category of goods: 54: Medicinal and pharmaceutical products\n- Goods as per contract: 3,696,766 units of hand sanitizer\n- Price: 89'072.64 USD (U.S. Dollar)\n- Seller\n\t- Name: Brands International Corporation\n\t- Place of business: Canada\n\t- Role in trade: Manufacturer of the goods sold\n- Buyer\n\t- Name: Reach Companies, LLC\n\t- Place of business: USA\n\t- Role in trade: Distributor", "court": "U.S. District Court for the District of Minnesota", "docketNumber": "21-1026 (JRT/DLM)", + "url": "https://cisg-online.org/search-for-cases?caseId=14425", "attachments": [ { "title": "Full text of decision Original language: English", "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [ + { + "note": "

Decision information

  • CISG applicable: yes, agreement of the parties
  • CISG applied: yes
  • (Domestic) law applied in addition: Minnesota law
  • Key CISG provisions interpreted and applied: Art. 74; Art. 78
  • Non-provision-specific issues addressed: Recoverability of attorneys' fees as damages
" + }, + { + "note": "

Comments

Decision published in

  • 2023 Westlaw (WL) 6391830 [Full text – in English]
" + }, + { + "note": "

Cites 4 case(s)

" + }, + { + "note": "

General information

Claimant

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John R. Tunheim (District Judge)\n

Case History

\n\n" }, { - "title": "CISG-Online Link", - "mimeType": "text/html", - "snapshot": false + "note": "

Contract information

  • Category of goods: 54: Medicinal and pharmaceutical products
  • Goods as per contract: 3,696,766 units of hand sanitizer
  • Price: 89'072.64 USD (U.S. Dollar)

Seller

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in trade: Manufacturer of the goods sold
\n

Buyer

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in trade: Distributor
\n" } ], - "tags": [], - "notes": [], "seeAlso": [] } ] }, - { - "type": "web", - "url": "https://cisg-online.org/search-for-cases", - "items": "multiple" - }, { "type": "web", "url": "https://cisg-online.org/search-for-cases/50-most-recently-added-cases", @@ -259,22 +365,30 @@ var testCases = [ "caseName": "Alcala v. Verbruggen Palletizing Solutions, Inc.", "creators": [], "dateDecided": "14 June 2023", - "abstractNote": "## General information:\n- Judge(s): G. Richard Bevan (Presiding Judge), Robyn Brody (Reporting judge), Colleen Zahn (Judge), Gregory W. Moeller (Judge), John Stegner (Judge)\n\n## Decision information:\n- (Domestic) law applied in addition: Wisconsin law\n- Non-provision-specific issues addressed: Personal injury (allegedly) caused by goods sold under CISG contract\n\n## Comment:\n- Editorial remark: []The only reference to the CISG is found in para. 71 of the decision:\"Fourth, the governing law clause in the Equipment Contract states it «shall be governed and construed according to» the laws of the «State of Wisconsin» and not the provisions of the United Nations Convention on Contracts for the International Sale of Goods («C.I.S.G.»). From the inclusion of this clause, it is reasonable to infer that because this transaction involved a foreign manufacturer (VE) and its United States affiliate (VPS) – the parties cautioned against application of the C.I.S.G. with the understanding that the Equipment Contract was predominantly for the sale of goods. See Fercus, S.R.L. v. Palazzo, No. 98 CIV 7728 (BRB), 2000 WL 1118925, at *3 (S.D.N.Y. Aug. 8, 2000) (explaining that the C.I.S.G. applies when, inter alia, contracting parties have places of business in different nations and the contract omits a choice of law provision).\"[...]", "court": "Supreme Court of the State of Idaho", "docketNumber": "49473, 49474", + "url": "https://cisg-online.org/search-for-cases?caseId=14276", "attachments": [ { "title": "Full text of decision Original language: English", "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [ + { + "note": "

Decision information

  • (Domestic) law applied in addition: Wisconsin law
  • Non-provision-specific issues addressed: Personal injury (allegedly) caused by goods sold under CISG contract
" + }, + { + "note": "

Comments

  • Editorial remark: []The only reference to the CISG is found in para. 71 of the decision:\"Fourth, the governing law clause in the Equipment Contract states it «shall be governed and construed according to» the laws of the «State of Wisconsin» and not the provisions of the United Nations Convention on Contracts for the International Sale of Goods («C.I.S.G.»). From the inclusion of this clause, it is reasonable to infer that because this transaction involved a foreign manufacturer (VE) and its United States affiliate (VPS) – the parties cautioned against application of the C.I.S.G. with the understanding that the Equipment Contract was predominantly for the sale of goods. See Fercus, S.R.L. v. Palazzo, No. 98 CIV 7728 (BRB), 2000 WL 1118925, at *3 (S.D.N.Y. Aug. 8, 2000) (explaining that the C.I.S.G. applies when, inter alia, contracting parties have places of business in different nations and the contract omits a choice of law provision).\"[...]

Decision published in

  • 531 Pacific Reporter, Third Series (P.3d) 1085 [Full text – in English]
  • 2023 Westlaw (WL) 3985206 [Full text – in English]
" }, { - "title": "CISG-Online Link", - "mimeType": "text/html", - "snapshot": false + "note": "

Cites 1 case(s)

" + }, + { + "note": "

General information

Judge(s)

G. Richard Bevan (Presiding Judge), Robyn Brody (Reporting judge), Colleen Zahn (Judge), Gregory W. Moeller (Judge), John Stegner (Judge)\n" } ], - "tags": [], - "notes": [], "seeAlso": [] } ] @@ -288,22 +402,33 @@ var testCases = [ "caseName": "Organic barley case", "creators": [], "dateDecided": "13 November 2002", - "abstractNote": "## General information:\n- Claimant\n\t- Place of business: Belgium\n\t- Role in transaction: Buyer\n- Respondent\n\t- Place of business: Germany\n\t- Role in transaction: Seller\n- Judge(s): Prof. Dr. Motzke (Presiding Judge), von Hofer (Judge), Dr. Ermer (Judge)\n\n## Decision information:\n- CISG applicable: yes, Art. 1(1)(a)\n- Key CISG provisions applied: Art. 35(1); Art. 39(1)\n- CISG provisions also cited: Art. 30; Art. 34; Art. 44\n\n## Contract information:\n- Category of goods: 4: Cereals and cereal preparations\n- Goods as per contract: Organic barley\n- Seller\n\t- Place of business: Germany\n- Buyer\n\t- Place of business: Belgium\n\n## Comment:\n- European Case Law Identifier (ECLI): ECLI:DE:OLGMUEN:2002:1113.27U346.02.0A\n- Case identifier in the old Albert H. Kritzer Database: 021113g1", "court": "Oberlandesgericht München (Court of Appeal Munich)", "docketNumber": "27 U 346/02", + "url": "https://cisg-online.org/search-for-cases?caseId=6714", "attachments": [ { "title": "Full text of decision Original language: German", "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [ + { + "note": "

Decision information

  • CISG applicable: yes, Art. 1(1)(a)
  • Key CISG provisions applied: Art. 35(1); Art. 39(1)
  • CISG provisions also cited: Art. 30; Art. 34; Art. 44
" + }, + { + "note": "

Comments

  • European Case Law Identifier (ECLI): ECLI:DE:OLGMUEN:2002:1113.27U346.02.0A
  • Case identifier in the old Albert H. Kritzer Database: 021113g1

Decision published in

  • Neue Juristische Wochenschrift – Rechtsprechungs-Report (NJW-RR) (2003), 849–850 [Full text – in German]
  • Juristische Schulung (JuS) (2003), 1134 [Leitsatz – in German]

Comment(s) on this decision

  • Gerhard Hohloch, 'OLG München: „Bio”-Konformität unter UN-Kaufrecht - Ökologischer Landbau', Juristische Schulung (JuS) (2003), 1134–1135 [– in German]
" + }, + { + "note": "

Cited by 1 case(s)

" + }, + { + "note": "

General information

Claimant

  • Place of business: Belgium
  • Role in transaction: Buyer
\n\n

Respondent

  • Place of business: Germany
  • Role in transaction: Seller
\n\n

Judge(s)

Prof. Dr. Motzke (Presiding Judge), von Hofer (Judge), Dr. Ermer (Judge)\n

Case History

\n\n" }, { - "title": "CISG-Online Link", - "mimeType": "text/html", - "snapshot": false + "note": "

Contract information

  • Category of goods: 4: Cereals and cereal preparations
  • Goods as per contract: Organic barley

Seller

  • Place of business: Germany
\n

Buyer

  • Place of business: Belgium
\n" } ], - "tags": [], - "notes": [], "seeAlso": [] } ] @@ -317,22 +442,30 @@ var testCases = [ "caseName": "Dioctyl phthalate case", "creators": [], "dateDecided": "16 August 1996", - "abstractNote": "## General information:\n- Claimant\n\t- Place of business: China\n\t- Role in transaction: Seller\n- Respondent\n\t- Place of business: Korea, Republic of (South Korea)\n\t- Role in transaction: Buyer\n\n## Decision information:\n- CISG applicable: yes, Art. 1(1)(a) and parties' agreement\n- CISG applied: yes\n- Key CISG provisions applied: Art. 74; Art. 75; Art. 77; Art. 78\n- CISG provisions also cited: Art. 18; Art. 35\n\n## Contract information:\n- Category of goods: 51: Organic chemicals\n- Goods as per contract: 768 tons of DOP (dioctyl phthalate)\n- Price: 1'551'360.00 USD (U.S. Dollar)\n- Seller\n\t- Place of business: China\n- Buyer\n\t- Place of business: Korea, Republic of (South Korea)\n\n## Comment:\n- Case identifier in the old Albert H. Kritzer Database: 960730c1", "court": "China International Economic & Trade Arbitration Commission (CIETAC)", "docketNumber": "CISG/1996/39", + "url": "https://cisg-online.org/search-for-cases?caseId=7035", "attachments": [ { - "title": "Translation of decision Language: English", + "title": "Translation of decision Language: English translated by Meihua Xu", "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [ + { + "note": "

Decision information

  • CISG applicable: yes, Art. 1(1)(a) and parties' agreement
  • CISG applied: yes
  • Key CISG provisions applied: Art. 74; Art. 75; Art. 77; Art. 78
  • CISG provisions also cited: Art. 18; Art. 35
" + }, + { + "note": "

Comments

  • Case identifier in the old Albert H. Kritzer Database: 960730c1
" }, { - "title": "CISG-Online Link", - "mimeType": "text/html", - "snapshot": false + "note": "

General information

Claimant

  • Place of business: China
  • Role in transaction: Seller
\n\n

Respondent

  • Place of business: Korea, Republic of (South Korea)
  • Role in transaction: Buyer
\n\n" + }, + { + "note": "

Contract information

  • Category of goods: 51: Organic chemicals
  • Goods as per contract: 768 tons of DOP (dioctyl phthalate)
  • Price: 1'551'360.00 USD (U.S. Dollar)

Seller

  • Place of business: China
\n

Buyer

  • Place of business: Korea, Republic of (South Korea)
\n" } ], - "tags": [], - "notes": [], "seeAlso": [] } ] @@ -346,22 +479,76 @@ var testCases = [ "caseName": "MSS, Inc. v. Maser Corp.", "creators": [], "dateDecided": "18 July 2011", - "abstractNote": "## General information:\n- Claimant\n\t- Name: MSS, Inc.\n\t- Place of business: USA\n\t- Role in transaction: Seller\n- Respondent\n\t- Name: Maser Corporation\n\t- Place of business: USA\n\t- Role in transaction: Buyer\n- Judge(s): John T. Nixon (Sole judge)\n\n## Decision information:\n- CISG applicable: left open\n- CISG applied: no, the present decision deals only with the validity of a contractual limitation of liability clause and therefore a matter not governed by the CISG\n- (Domestic) law applied in addition: Tennessee law\n- Key CISG provisions applied: Art. 4\n- CISG provisions also cited: Art. 1(1)(a)\n- Relevant CISG provisions not cited: Art. 10\n\n## Contract information:\n- Category of goods: 72: Machinery specialized for particular industries\n- Goods as per contract: Metalsort machine for the sorting of plastics and metals for material recovery and recycling\n- Seller\n\t- Name: MSS, Inc.\n\t- Place of business: USA\n- Buyer\n\t- Name: Maser Corporation\n\t- Place of business: USA\n- Buyer\n\t- Name: Maser Canada Inc.\n\t- Place of business: Canada\n\n## Comment:\n- Editorial remark by Ulrich G. Schroeter: In the present case, it was disputed whether the sales contract with the U.S. seller MSS, Inc. had been concluded by Maser, Corp. (based in the U.S.) as buyer (meaning that it was a domestic sales contract to which the CISG would not be applicable), or with its wholly-owned subsidiary Maser Canada, Inc. (meaning that it was an international sales contract governed by the CISG in accordance with Art. 1(1)(a)). The Court left the question open and held that the question to be determined by the present order - the validity of a limitation of liability clause found in the contract - was in any case not governed by the CISG, but only by domestic law.\n- Case identifier in the old Albert H. Kritzer Database: 110718u1", "court": "U.S. District Court for the District of Maryland", "docketNumber": "3:09-cv-00601", + "url": "https://cisg-online.org/search-for-cases?caseId=8138", "attachments": [ { "title": "Full text of decision Original language: English", "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [ + { + "note": "

Decision information

  • CISG applicable: left open
  • CISG applied: no, the present decision deals only with the validity of a contractual limitation of liability clause and therefore a matter not governed by the CISG
  • (Domestic) law applied in addition: Tennessee law
  • Key CISG provisions applied: Art. 4
  • CISG provisions also cited: Art. 1(1)(a)
  • Relevant CISG provisions not cited: Art. 10
" + }, + { + "note": "

Comments

  • Editorial remark by Ulrich G. Schroeter: In the present case, it was disputed whether the sales contract with the U.S. seller MSS, Inc. had been concluded by Maser, Corp. (based in the U.S.) as buyer (meaning that it was a domestic sales contract to which the CISG would not be applicable), or with its wholly-owned subsidiary Maser Canada, Inc. (meaning that it was an international sales contract governed by the CISG in accordance with Art. 1(1)(a)). The Court left the question open and held that the question to be determined by the present order - the validity of a limitation of liability clause found in the contract - was in any case not governed by the CISG, but only by domestic law.
  • Case identifier in the old Albert H. Kritzer Database: 110718u1

Comment(s) on this decision

  • Gregory M. Duhl, 'International Sale of Goods', 67 Business Lawyer (Bus. Law.) (2012), 1337–1349, at 1346–1347 [– in English]
" + }, + { + "note": "

Cites 3 case(s)

" + }, + { + "note": "

General information

Claimant

  • Name: MSS, Inc.
  • Place of business: USA
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Maser Corporation
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John T. Nixon (Sole judge)\n" }, { - "title": "CISG-Online Link", - "mimeType": "text/html", - "snapshot": false + "note": "

Contract information

  • Category of goods: 72: Machinery specialized for particular industries
  • Goods as per contract: Metalsort machine for the sorting of plastics and metals for material recovery and recycling

Seller

  • Name: MSS, Inc.
  • Place of business: USA
\n

Buyer

  • Name: Maser Corporation
  • Place of business: USA
\n

Buyer

  • Name: Maser Canada Inc.
  • Place of business: Canada
\n" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cisg-online.org/search-for-cases?caseId=14193", + "items": [ + { + "itemType": "case", + "caseName": "Brands International Corporation v. Reach Companies, LLC", + "creators": [], + "dateDecided": "11 April 2023", + "court": "U.S. District Court for the District of Minnesota", + "docketNumber": "0:2021cv01026", + "url": "https://cisg-online.org/search-for-cases?caseId=14193", + "attachments": [ + { + "title": "Full text of decision Original language: English", + "mimeType": "application/pdf" } ], "tags": [], - "notes": [], + "notes": [ + { + "note": "

Decision information

  • CISG applicable: yes, Art. 1(1)(a)
  • (Domestic) law applied in addition: Minnesota law
  • Key CISG provisions interpreted: Art. 7(1); Art. 74
  • Key CISG provisions applied: Art. 1(1)(a); Art. 54; Art. 59; Art. 64; Art. 73(2); Art. 78
  • CISG provisions also cited: Art. 7(2); Art. 14(1); Art. 18(1); Art. 23; Art. 25; Art. 33; Art. 71(1)
  • Non-provision-specific issues addressed: Recoverability of attorneys' fees as damages
" + }, + { + "note": "

Comments

  • Editorial remark by Ulrich G. Schroeter: In the present decision about a dispute arising from a sales contract between a Canadian seller (Claimant) and a U.S. buyer, the U.S. District Court for the District of Minnesota inter alia held (in paras. 38–44) that compensation for the attorneys’ fees incurred could be claimed by the Canadian seller as damages under Art. 74 CISG. The District Court thereby deviated from the U.S. Court of Appeal (7th Cir.)’s well-known decision in the Zapata case (CISG-online 684):„Whether the CISG contemplates the inclusion of attorney’s fees in the measure of damages is an issue of first impression in the Eighth Circuit. Though the Seventh Circuit has held that the CISG Article 74 does not include an award of attorney’s fees, the Court finds the Seventh Circuit’s analysis unpersuasive and will not apply it here. …“ [Further reasoning follows.]
" + }, + { + "note": "

Cites 5 case(s)

" + }, + { + "note": "

Cited by 1 case(s)

" + }, + { + "note": "

General information

Claimant

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John R. Tunheim (Sole judge)\n

Case History

\n\n" + }, + { + "note": "

Contract information

  • Category of goods: 54: Medicinal and pharmaceutical products
  • Goods as per contract: 3,696,766 units of hand sanitizer
  • Price: 89'072.64 USD (U.S. Dollar)

Seller

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in trade: Manufacturer of the goods sold
\n

Buyer

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in trade: Distributor
\n" + } + ], "seeAlso": [] } ] From 91c2648a8f86ab62f197485066296b9cdc4617a2 Mon Sep 17 00:00:00 2001 From: Jonas Zaugg Date: Fri, 27 Oct 2023 10:50:34 +0200 Subject: [PATCH 3/5] Save dates as ISO --- CISG-Online.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CISG-Online.js b/CISG-Online.js index 9fa85c2ad2..31c688a686 100644 --- a/CISG-Online.js +++ b/CISG-Online.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-10-27 00:42:14" + "lastUpdated": "2023-10-27 08:50:12" } /* @@ -268,7 +268,7 @@ async function scrape(doc, url = doc.location.href) { item.caseName = caseName; item.court = court ? court : tribunal; item.country = jurisdiction ? jurisdiction : seat; - item.dateDecided = date; + item.dateDecided = ZU.strToISO(date); item.docketNumber = docket; item["CISG-Online"] = eprint; @@ -319,7 +319,7 @@ var testCases = [ "itemType": "case", "caseName": "Brands International Corporation v. Reach Companies, LLC", "creators": [], - "dateDecided": "02 October 2023", + "dateDecided": "2023-10-02", "court": "U.S. District Court for the District of Minnesota", "docketNumber": "21-1026 (JRT/DLM)", "url": "https://cisg-online.org/search-for-cases?caseId=14425", @@ -364,7 +364,7 @@ var testCases = [ "itemType": "case", "caseName": "Alcala v. Verbruggen Palletizing Solutions, Inc.", "creators": [], - "dateDecided": "14 June 2023", + "dateDecided": "2023-06-14", "court": "Supreme Court of the State of Idaho", "docketNumber": "49473, 49474", "url": "https://cisg-online.org/search-for-cases?caseId=14276", @@ -401,7 +401,7 @@ var testCases = [ "itemType": "case", "caseName": "Organic barley case", "creators": [], - "dateDecided": "13 November 2002", + "dateDecided": "2002-11-13", "court": "Oberlandesgericht München (Court of Appeal Munich)", "docketNumber": "27 U 346/02", "url": "https://cisg-online.org/search-for-cases?caseId=6714", @@ -441,7 +441,7 @@ var testCases = [ "itemType": "case", "caseName": "Dioctyl phthalate case", "creators": [], - "dateDecided": "16 August 1996", + "dateDecided": "1996-08-16", "court": "China International Economic & Trade Arbitration Commission (CIETAC)", "docketNumber": "CISG/1996/39", "url": "https://cisg-online.org/search-for-cases?caseId=7035", @@ -478,7 +478,7 @@ var testCases = [ "itemType": "case", "caseName": "MSS, Inc. v. Maser Corp.", "creators": [], - "dateDecided": "18 July 2011", + "dateDecided": "2011-07-18", "court": "U.S. District Court for the District of Maryland", "docketNumber": "3:09-cv-00601", "url": "https://cisg-online.org/search-for-cases?caseId=8138", @@ -518,7 +518,7 @@ var testCases = [ "itemType": "case", "caseName": "Brands International Corporation v. Reach Companies, LLC", "creators": [], - "dateDecided": "11 April 2023", + "dateDecided": "2023-04-11", "court": "U.S. District Court for the District of Minnesota", "docketNumber": "0:2021cv01026", "url": "https://cisg-online.org/search-for-cases?caseId=14193", From b3685e7daeb8b21c34a6fa5f40ae10bf8f9dc7af Mon Sep 17 00:00:00 2001 From: Jonas Zaugg Date: Fri, 27 Sep 2024 22:30:46 +0200 Subject: [PATCH 4/5] Cleanup --- CISG-Online.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/CISG-Online.js b/CISG-Online.js index 31c688a686..28b59d9b76 100644 --- a/CISG-Online.js +++ b/CISG-Online.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-10-27 08:50:12" + "lastUpdated": "2024-09-27 20:28:58" } /* @@ -341,7 +341,7 @@ var testCases = [ "note": "

Cites 4 case(s)

" }, { - "note": "

General information

Claimant

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John R. Tunheim (District Judge)\n

Case History

\n\n" + "note": "

General information

Claimant

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John R. Tunheim (District Judge)\n

Case History

\n\n" }, { "note": "

Contract information

  • Category of goods: 54: Medicinal and pharmaceutical products
  • Goods as per contract: 3,696,766 units of hand sanitizer
  • Price: 89'072.64 USD (U.S. Dollar)

Seller

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in trade: Manufacturer of the goods sold
\n

Buyer

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in trade: Distributor
\n" @@ -406,6 +406,10 @@ var testCases = [ "docketNumber": "27 U 346/02", "url": "https://cisg-online.org/search-for-cases?caseId=6714", "attachments": [ + { + "title": "Comment(s) on this decision", + "mimeType": "application/pdf" + }, { "title": "Full text of decision Original language: German", "mimeType": "application/pdf" @@ -417,10 +421,10 @@ var testCases = [ "note": "

Decision information

  • CISG applicable: yes, Art. 1(1)(a)
  • Key CISG provisions applied: Art. 35(1); Art. 39(1)
  • CISG provisions also cited: Art. 30; Art. 34; Art. 44
" }, { - "note": "

Comments

  • European Case Law Identifier (ECLI): ECLI:DE:OLGMUEN:2002:1113.27U346.02.0A
  • Case identifier in the old Albert H. Kritzer Database: 021113g1

Decision published in

  • Neue Juristische Wochenschrift – Rechtsprechungs-Report (NJW-RR) (2003), 849–850 [Full text – in German]
  • Juristische Schulung (JuS) (2003), 1134 [Leitsatz – in German]

Comment(s) on this decision

  • Gerhard Hohloch, 'OLG München: „Bio”-Konformität unter UN-Kaufrecht - Ökologischer Landbau', Juristische Schulung (JuS) (2003), 1134–1135 [– in German]
" + "note": "

Comments

  • European Case Law Identifier (ECLI): ECLI:DE:OLGMUEN:2002:1113.27U346.02.0A
  • Case identifier in the old Albert H. Kritzer Database: 021113g1

Decision published in

  • Neue Juristische Wochenschrift – Rechtsprechungs-Report (NJW-RR) (2003), 849–850 [Full text – in German]
  • Juristische Schulung (JuS) (2003), 1134 [Leitsatz (headnote) – in German]

Comment(s) on this decision

" }, { - "note": "

Cited by 1 case(s)

" + "note": "

Cited by 1 case(s)

" }, { "note": "

General information

Claimant

  • Place of business: Belgium
  • Role in transaction: Buyer
\n\n

Respondent

  • Place of business: Germany
  • Role in transaction: Seller
\n\n

Judge(s)

Prof. Dr. Motzke (Presiding Judge), von Hofer (Judge), Dr. Ermer (Judge)\n

Case History

\n\n" @@ -497,7 +501,7 @@ var testCases = [ "note": "

Comments

  • Editorial remark by Ulrich G. Schroeter: In the present case, it was disputed whether the sales contract with the U.S. seller MSS, Inc. had been concluded by Maser, Corp. (based in the U.S.) as buyer (meaning that it was a domestic sales contract to which the CISG would not be applicable), or with its wholly-owned subsidiary Maser Canada, Inc. (meaning that it was an international sales contract governed by the CISG in accordance with Art. 1(1)(a)). The Court left the question open and held that the question to be determined by the present order - the validity of a limitation of liability clause found in the contract - was in any case not governed by the CISG, but only by domestic law.
  • Case identifier in the old Albert H. Kritzer Database: 110718u1

Comment(s) on this decision

  • Gregory M. Duhl, 'International Sale of Goods', 67 Business Lawyer (Bus. Law.) (2012), 1337–1349, at 1346–1347 [– in English]
" }, { - "note": "

Cites 3 case(s)

" + "note": "

Cites 3 case(s)

" }, { "note": "

General information

Claimant

  • Name: MSS, Inc.
  • Place of business: USA
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Maser Corporation
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John T. Nixon (Sole judge)\n" @@ -537,13 +541,13 @@ var testCases = [ "note": "

Comments

  • Editorial remark by Ulrich G. Schroeter: In the present decision about a dispute arising from a sales contract between a Canadian seller (Claimant) and a U.S. buyer, the U.S. District Court for the District of Minnesota inter alia held (in paras. 38–44) that compensation for the attorneys’ fees incurred could be claimed by the Canadian seller as damages under Art. 74 CISG. The District Court thereby deviated from the U.S. Court of Appeal (7th Cir.)’s well-known decision in the Zapata case (CISG-online 684):„Whether the CISG contemplates the inclusion of attorney’s fees in the measure of damages is an issue of first impression in the Eighth Circuit. Though the Seventh Circuit has held that the CISG Article 74 does not include an award of attorney’s fees, the Court finds the Seventh Circuit’s analysis unpersuasive and will not apply it here. …“ [Further reasoning follows.]
" }, { - "note": "

Cites 5 case(s)

" + "note": "

Cites 5 case(s)

" }, { "note": "

Cited by 1 case(s)

" }, { - "note": "

General information

Claimant

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John R. Tunheim (Sole judge)\n

Case History

\n\n" + "note": "

General information

Claimant

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in transaction: Seller
\n\n

Respondent

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in transaction: Buyer
\n\n

Judge(s)

John R. Tunheim (Sole judge)\n

Case History

\n\n" }, { "note": "

Contract information

  • Category of goods: 54: Medicinal and pharmaceutical products
  • Goods as per contract: 3,696,766 units of hand sanitizer
  • Price: 89'072.64 USD (U.S. Dollar)

Seller

  • Name: Brands International Corporation
  • Place of business: Canada
  • Role in trade: Manufacturer of the goods sold
\n

Buyer

  • Name: Reach Companies, LLC
  • Place of business: USA
  • Role in trade: Distributor
\n" From ba49c24efa209433c3f3ba3dc77f99bab0c5bb92 Mon Sep 17 00:00:00 2001 From: Jonas Zaugg Date: Tue, 1 Oct 2024 18:51:21 +0200 Subject: [PATCH 5/5] Fixes base on review --- CISG-Online.js | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/CISG-Online.js b/CISG-Online.js index 28b59d9b76..0137747739 100644 --- a/CISG-Online.js +++ b/CISG-Online.js @@ -2,14 +2,14 @@ "translatorID": "045d1f03-d17b-4437-9290-d3a4203c4cbc", "label": "CISG-Online", "creator": "Jonas Zaugg", - "target": "^https?://cisg-online.org/search-for-cases", + "target": "^https?://cisg-online\\.org/", "minVersion": "5.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-09-27 20:28:58" + "lastUpdated": "2024-10-01 16:50:52" } /* @@ -37,13 +37,12 @@ function detectWeb(doc, url) { - // TODO: adjust the logic here if (url.includes('caseId=')) { return 'case'; } else if (url.includes('search-for-cases')) { // Only present on search form, not on top 50 pages - let searchResultsContainer = doc.querySelector('div#searchCaseResult'); + let searchResultsContainer = doc.querySelector('#searchCaseResult'); if (searchResultsContainer) Z.monitorDOMChanges(searchResultsContainer); if (getSearchResults(doc, true)) { return 'multiple'; @@ -55,12 +54,10 @@ function detectWeb(doc, url) { function getSearchResults(doc, checkOnly) { var items = {}; var found = false; - let selector = 'div.search-result div.col-md-10 a.search-result-link'; + let selector = '.search-result a.search-result-link'; var rows = doc.querySelectorAll(selector); for (let row of rows) { - // TODO: check and maybe adjust let href = row.href; - // TODO: check and maybe adjust let title = ZU.trimInternal(row.textContent); if (!href || !title) continue; if (checkOnly) return true; @@ -87,7 +84,6 @@ async function doWeb(doc, url) { function labellize(row) { let segments = row.querySelectorAll("div"); if (segments.length != 2) { - Z.debug("Row does not contain exactly 2 elements but " + segments.length); return null; } @@ -99,7 +95,7 @@ function getRow(doc, sectionName, rowName) { let selector = `div.${sectionName}-rows div.row:not([data-has-content]):not([data-is-content])`; let rows = doc.querySelectorAll(selector); let result; - for (let row of rows.values()) { + for (let row of rows) { if (row.textContent.includes(rowName)) return row.children[1]; } return result; @@ -117,25 +113,22 @@ function getDataBlock(doc, selector, label) { if (!blocks.length) return null; let result = ""; - for (let block of blocks.values()) { + for (let block of blocks) { result += `

${label}

    `; - // TODO: check fragility let rows = block.querySelectorAll("div.row > div > div.row"); - for (let row of rows.values()) result += `
  • ${labellize(row)}
  • `; + for (let row of rows) result += `
  • ${labellize(row)}
  • `; result += "
\n"; } - Z.debug(result); return result; } -// For sellers, buyers, claimants, respondents but not history +// For case history function getCaseHistory(doc) { let cases = doc.querySelectorAll(`div[data-is-content='history'] div.is-content-history`); if (!cases.length) return null; let result = "

Case History

    "; - for (let cisgCase of cases.values()) { - //result += `
  • ${labellize(row)}
  • `; + for (let cisgCase of cases) { if (cisgCase.classList.contains('is-this-case')) result += "
  • Present decision
  • "; else { let caseName = ZU.trimInternal(text(cisgCase, 'div.row')); @@ -145,30 +138,28 @@ function getCaseHistory(doc) { } } result += "
\n"; - Z.debug(result); return result; } function getInfoBlock(doc, selector, label) { - let rows = doc.querySelectorAll(`div.${selector}-rows > div.row:not([data-has-content]):not([data-is-content])`); + let rows = doc.querySelectorAll(`.${selector}-rows > .row:not([data-has-content]):not([data-is-content])`); if (!rows.length) return null; let result = `

${label}

    `; - for (let row of rows.values()) result += `
  • ${labellize(row)}
  • `; + for (let row of rows) result += `
  • ${labellize(row)}
  • `; result += "
"; return result; } function getContentCases(doc, selector) { - return doc.querySelectorAll(`div[data-is-content='${selector}'] div.is-content-cases`); + return doc.querySelectorAll(`div[data-is-content='${selector}'] .is-content-cases`); } function addPDFs(doc, item) { // Decision or abstract in PDF let caseFiles = getContentCases(doc, 'fullTextTranslationFiles'); - for (let caseFile of caseFiles.values()) { + for (let caseFile of caseFiles) { let caseFileName = ZU.trimInternal(caseFile.textContent); - Z.debug("Adding case file: " + caseFileName); let caseFileAnchor = caseFile.querySelector("a"); if (caseFileAnchor) { item.attachments.push({ @@ -182,12 +173,11 @@ function addPDFs(doc, item) { function getCISGCases(doc, selector, label) { let cases = getContentCases(doc, selector); - Z.debug(`${label} ${cases.length} CISG-Online decisions.`); if (!cases.length) return null; let note = `

${label} ${cases.length} case(s)

    `; - for (let cisgCase of cases.values()) { + for (let cisgCase of cases) { let caseName = ZU.trimInternal(text(cisgCase, 'div.row')); let caseID = cisgCase.getAttribute('id').replace('searchCaseRow_', ''); let caseURL = `https://cisg-online.org/search-for-cases?caseId=${caseID}`; @@ -203,7 +193,7 @@ function getCommentExtras(doc, item, selector, label) { if (!extras.length) return null; let note = `

    ${label}

      `; - for (let extra of extras.values()) { + for (let extra of extras) { let extraText = ZU.trimInternal(extra.textContent); let extraAnchor = extra.querySelector("a");