idnits 2.17.1 draft-ietf-appsawg-http-problem-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 600 has weird spacing: '...element type ...' == Line 601 has weird spacing: '...element title...' == Line 602 has weird spacing: '...element detai...' == Line 603 has weird spacing: '...element statu...' == Line 604 has weird spacing: '...element insta...' == (1 more instance...) -- The document date (December 6, 2015) is 3057 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 18 ** Obsolete normative reference: RFC 7159 (Obsoleted by RFC 8259) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 5988 (Obsoleted by RFC 8288) Summary: 4 errors (**), 0 flaws (~~), 7 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft Akamai 4 Intended status: Standards Track E. Wilde 5 Expires: June 8, 2016 December 6, 2015 7 Problem Details for HTTP APIs 8 draft-ietf-appsawg-http-problem-02 10 Abstract 12 This document defines a "problem detail" as a way to carry machine- 13 readable details of errors in a HTTP response, to avoid the need to 14 define new error response formats for HTTP APIs. 16 Note to Readers 18 This draft should be discussed on the apps-discuss mailing list [1]. 20 This section is to be removed before publication. 22 Note to RFC Editor 24 Please replace all occurrences of "XXXX" with the final RFC number 25 chosen for this draft. 27 This section is to be removed before publication. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on June 8, 2016. 46 Copyright Notice 48 Copyright (c) 2015 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 64 2. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 4 65 3. The Problem Details JSON Object . . . . . . . . . . . . . . . 4 66 3.1. Problem Details Object Members . . . . . . . . . . . . . 5 67 3.2. Extension Members . . . . . . . . . . . . . . . . . . . . 6 68 4. Defining New Problem Types . . . . . . . . . . . . . . . . . 6 69 4.1. Example . . . . . . . . . . . . . . . . . . . . . . . . . 8 70 4.2. Pre-Defined Problem Types . . . . . . . . . . . . . . . . 8 71 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 72 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 73 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 74 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 75 8.1. Normative References . . . . . . . . . . . . . . . . . . 11 76 8.2. Informative References . . . . . . . . . . . . . . . . . 12 77 Appendix A. HTTP Problems and XML . . . . . . . . . . . . . . . 13 78 Appendix B. Using Problem Details with Other Formats . . . . . . 15 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16 81 1. Introduction 83 HTTP [RFC7230] status codes are sometimes not sufficient to convey 84 enough information about an error to be helpful. While humans behind 85 Web browsers can be informed about the nature of the problem with an 86 HTML [W3C.REC-html5-20141028] response body, non-human consumers of 87 so-called "HTTP APIs" are usually not. 89 This specification defines simple JSON [RFC7159] and XML 90 [W3C.REC-xml-20081126] document formats to suit this purpose. They 91 are designed to be reused by HTTP APIs, which can identify distinct 92 "problem types" specific to their needs. 94 Thus, API clients can be informed of both the high-level error class 95 (using the status code) and the finer-grained details of the problem 96 (using one of these formats). 98 For example, consider a response that indicates that the client's 99 account doesn't have enough credit. The 403 Forbidden status code 100 might be deemed most appropriate to use, as it will inform HTTP- 101 generic software (such as client libraries, caches and proxies) of 102 the general semantics of the response. 104 However, that doesn't give the API client enough information about 105 why the request was forbidden, the applicable account balance, or how 106 to correct the problem. If these details are included in the 107 response body in a machine-readable format, the client can treat it 108 appropriately; for example, triggering a transfer of more credit into 109 the account. 111 This specification does this by identifying a specific type of 112 problem (e.g., "out of credit") with a URI [RFC3986]; HTTP APIs can 113 do this by nominating new URIs under their control, or by reusing 114 existing ones. 116 Additionally, problems can contain other information, such as a URI 117 that identifies the specific occurrence of the problem (effectively 118 giving an identifier to the concept "The time Joe didn't have enough 119 credit last Thursday"), which can be useful for support or forensic 120 purposes. 122 The data model for problem details is a JSON [RFC7159] object; when 123 formatted as a JSON document, it uses the "application/problem+json" 124 media type. Appendix A defines how to express them in an equivalent 125 XML format, which uses the "application/problem+xml" media type. 127 Note that problem details are (naturally) not the only way to convey 128 the details of a problem in HTTP; if the response is still a 129 representation of a resource, for example, it's often preferable to 130 accommodate describing the relevant details in that application's 131 format. Likewise, in many situations, there is an appropriate HTTP 132 status code that does not require extra detail to be conveyed. 134 Instead, the aim of this specification is to define common error 135 formats for those applications that need one, so that they aren't 136 required to define their own, or worse, tempted to re-define the 137 semantics of existing HTTP status codes. Even if an application 138 chooses not to use it to convey errors, reviewing its design can help 139 guide the design decisions faced when conveying errors in an existing 140 format. 142 2. Requirements 144 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 145 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 146 document are to be interpreted as described in [RFC2119]. 148 3. The Problem Details JSON Object 150 The canonical model for problem details is a JSON [RFC7159] object. 152 When serialised as a JSON document, that format is identified with 153 the "application/problem+json" media type. 155 For example, a HTTP response carrying JSON problem details: 157 HTTP/1.1 403 Forbidden 158 Content-Type: application/problem+json 159 Content-Language: en 161 { 162 "type": "https://example.com/probs/out-of-credit", 163 "title": "You do not have enough credit.", 164 "detail": "Your current balance is 30, but that costs 50.", 165 "instance": "/account/12345/msgs/abc", 166 "balance": 30, 167 "accounts": ["/account/12345", 168 "/account/67890"] 169 } 171 Here, the out-of-credit problem (identified by its type URI) 172 indicates the reason for the 403 in "title", gives a reference for 173 the specific problem occurrence with "instance", gives occurrence- 174 specific details in "detail", and adds two extensions; "balance" 175 conveys the account's balance, and "accounts" gives links where the 176 account can be topped up. 178 The ability to convey problem-specific extensions allows more than 179 one problem to be conveyed. For example: 181 HTTP/1.1 400 Bad Request 182 Content-Type: application/problem+json 183 Content-Language: en 185 { 186 "type": "https://example.net/validation-error", 187 "title": "Your request parameters didn't validate.", 188 "invalid-params": [ { 189 "name": "age", 190 "reason": "must be a positive integer" 191 }, 192 { 193 "name": "color", 194 "reason": "must be 'green', 'red' or 'blue'"} 195 ] 196 } 198 Note that this requires each of the sub-problems to be similar enough 199 to use the same HTTP status code. If they do not, the 207 (Multi- 200 Status) [RFC4918] code could be used to encapsulate multiple status 201 messages. 203 3.1. Problem Details Object Members 205 A problem details object can have the following members: 207 o "type" (string) - A URI reference [RFC3986] that identifies the 208 problem type. When dereferenced, it is encouraged to provide 209 human-readable documentation for the problem type (e.g., using 210 HTML [W3C.REC-html5-20141028]). When this member is not present, 211 its value is assumed to be "about:blank". 213 o "title" (string) - A short, human-readable summary of the problem 214 type. It SHOULD NOT change from occurrence to occurrence of the 215 problem, except for purposes of localisation (e.g., using 216 proactive content negotiation; see [RFC7231], Section 3.4). 218 o "status" (number) - The HTTP status code ([RFC7231], Section 6) 219 generated by the origin server for this occurrence of the problem. 221 o "detail" (string) - An human readable explanation specific to this 222 occurrence of the problem. 224 o "instance" (string) - A URI reference that identifies the specific 225 occurrence of the problem. It may or may not yield further 226 information if dereferenced. 228 Consumers MUST use the type string as the primary identifier for the 229 problem type; the title string is advisory, and included only for 230 users who are not aware of the semantics of the URI, and don't have 231 the ability to discover them (e.g., offline log analysis). Consumers 232 SHOULD NOT automatically dereference the type URI. 234 The status member, if present, is only advisory; it conveys the HTTP 235 status code used for the convenience of the consumer. Generators 236 MUST use the same status code in the actual HTTP response, to assure 237 that generic HTTP software that does not understand this format still 238 behaves correctly. See Section 5 for further caveats regarding its 239 use. 241 The detail member, if present, ought to focus on helping the client 242 correct the problem, rather than giving debugging information. 244 Consumers SHOULD NOT parse the detail member for information; 245 extensions are more suitable and less error-prone ways to obtain such 246 information. 248 Note that both "type" and "instance" accept relative URIs; this means 249 that they must be resolved relative to the document's base URI, as 250 per [RFC3986], Section 5. 252 3.2. Extension Members 254 Problem type definitions MAY extend the problem details object with 255 additional members. 257 For example, our "out of credit" problem above defines two such 258 extensions, "balance" and "accounts" to convey additional, problem- 259 specific information. 261 Clients consuming problem details MUST ignore any such extensions 262 that they don't recognise; this allows problem types to evolve and 263 include additional information in the future. 265 Note that because extensions are effectively name spaced by the 266 problem type, it is not possible to define new "standard" members 267 without defining a new media type. 269 4. Defining New Problem Types 271 When an HTTP API needs to define a response that indicates an error 272 condition, it might be appropriate to do so by defining a new problem 273 type. 275 Before doing so, it's important to understand what they are good for, 276 and what's better left to other mechanisms. 278 Problem details are not a debugging tool for the underlying 279 implementation; rather, they are a way to expose greater detail about 280 the HTTP interface itself. New problem types need to carefully 281 consider the Security Considerations (Section 5); in particular the 282 risk of exposing attack vectors by exposing implementation internals 283 through error messages. 285 Likewise, truly generic problems - i.e., conditions that could 286 potentially apply to any resource on the Web - are usually better 287 expressed as plain status codes. For example, a "write access 288 disallowed" problem is probably unnecessary, since a 403 Forbidden 289 status code in response to a PUT request is self-explanatory. 291 Finally, an application might have a more appropriate way to carry an 292 error in a format that it already defines. Problem details are 293 intended to avoid the necessity of establishing new "fault" or 294 "error" document formats, not to replace existing domain-specific 295 formats. 297 That said, it is possible to add support for problem details to 298 existing HTTP APIs using HTTP content negotiation (e.g., using the 299 Accept request header to indicate a preference for this format; see 300 [RFC7231], Section 5.3.2). 302 New problem type definitions MUST document: 304 1. A type URI (typically, with the "http" scheme), 306 2. A title that appropriately describes it (think short), and 308 3. The HTTP status code for it to be used with. 310 Problem type definitions MAY specify the use of the Retry-After 311 response header ([RFC7231], Section 7.1.3) in appropriate 312 circumstances. 314 A problem's type URI SHOULD resolve to HTML [W3C.REC-html5-20141028] 315 documentation that explains how to resolve the problem. 317 A problem type definition MAY specify additional members on the 318 Problem Details object. For example, an extension might use typed 319 links [RFC5988] to another resource that can be used by machines to 320 resolve the problem. 322 If such additional members are defined, their names SHOULD start with 323 a letter (ALPHA, as per [RFC5234], Appendix B.1) and SHOULD consist 324 of characters from ALPHA, DIGIT (Ibid.), and "_" (so that it can be 325 serialized in formats other than JSON), and SHOULD be three 326 characters or longer. 328 4.1. Example 330 For example, if you are publishing an HTTP API to your online 331 shopping cart, you might need to indicate that the user is out of 332 credit (our example from above), and therefore cannot make the 333 purchase. 335 If you already have an application-specific format that can 336 accommodate this information, it's probably best to do that. 337 However, if you don't, you might consider using one of the problem 338 details formats; JSON if your API is JSON-based, or XML if it uses 339 that format. 341 To do so, you might look for an already-defined type URI that suits 342 your purposes. If one is available, you can reuse that URI. 344 If one isn't available, you could mint and document a new type URI 345 (which ought to be under your control and stable over time), an 346 appropriate title and the HTTP status code that it will be used with, 347 along with what it means and how it should be handled. 349 In summary: an instance URI will always identify a specific 350 occurrence of a problem. On the other hand, type URIs can be reused 351 if an appropriate description of a problem type is already available 352 someplace else, or they can be created for new problem types. 354 4.2. Pre-Defined Problem Types 356 This specification reserves the use of one URI as a problem type: 358 The "about:blank" URI [RFC6694], when used as a problem type, 359 indicates that the problem has no additional semantics beyond that of 360 the HTTP status code. 362 When "about:blank" is used, the title SHOULD be the same as the 363 recommended HTTP status phrase for that code (e.g., "Not Found" for 364 404, and so on), although it MAY be localized to suit client 365 preferences (expressed with the Accept-Language request header). 367 Please note that according to how the "type" member is defined 368 (Section 3.1), the "about:blank" URI is the default value for that 369 member. Consequently, any problem details object not carrying an 370 explicit "type" member implicitly uses this URI. 372 5. Security Considerations 374 When defining a new problem type, the information included must be 375 carefully vetted. Likewise, when actually generating a problem - 376 however it is serialized - the details given must also be 377 scrutinized. 379 Risks include leaking information that can be exploited to compromise 380 the system, access to the system, or the privacy of users of the 381 system. 383 Generators providing links to occurrence information are encouraged 384 to avoid making implementation details such as a stack dump available 385 through the HTTP interface, since this can expose sensitive details 386 of the server implementation, its data, and so on. 388 The "status" member duplicates the information available in the HTTP 389 status code itself, thereby bringing the possibility of disagreement 390 between the two. Their relative precedence is not clear, since a 391 disagreement might indicate that (for example) an intermediary has 392 modified the HTTP status code in transit. As such, those defining 393 problem types as well as generators and consumers of problems need to 394 be aware that generic software (such as proxies, load balancers, 395 firewalls, virus scanners) are unlikely to know of or respect the 396 status code conveyed in this member. 398 6. IANA Considerations 400 This specification defines two new Internet media types [RFC6838]: 402 Type name: application 404 Subtype name: problem+json 406 Required parameters: None 408 Optional parameters: None; unrecognised parameters should be ignored 410 Encoding considerations: Same as [RFC7159] 412 Security considerations: see Section 5 of this document 414 Interoperability considerations: None 416 Published specification: [this document] 417 Applications that use this media type: HTTP 419 Fragment identifier considerations: Same as for application/json 420 ([RFC7159]) 422 Additional information: 424 Deprecated alias names for this type: n/a 426 Magic number(s): n/a 428 File extension(s): n/a 430 Macintosh file type code(s): n/a 432 Person and email address to contact for further information: Mark No 433 ttingham 435 Intended usage: COMMON 437 Restrictions on usage: None. 439 Author: Mark Nottingham 441 Change controller: IESG 443 Type name: application 445 Subtype name: problem+xml 447 Required parameters: None 449 Optional parameters: None; unrecognised parameters should be ignored 451 Encoding considerations: Same as [RFC7303] 453 Security considerations: see Section 5 of this document 455 Interoperability considerations: None 457 Published specification: [this document] 459 Applications that use this media type: HTTP 461 Fragment identifier considerations: Same as for application/xml (as 462 specified by Section 5 of [RFC7303]) 464 Additional information: 466 Deprecated alias names for this type: n/a 468 Magic number(s): n/a 470 File extension(s): n/a 472 Macintosh file type code(s): n/a 474 Person and email address to contact for further information: Mark No 475 ttingham 477 Intended usage: COMMON 479 Restrictions on usage: None. 481 Author: Mark Nottingham 483 Change controller: IESG 485 7. Acknowledgements 487 The authors would like to thank Jan Algermissen, Mike Amundsen, Subbu 488 Allamaraju, Roy Fielding, Eran Hammer, Sam Johnston, Mike McCall, 489 Julian Reschke, and James Snell for review of this specification. 491 8. References 493 8.1. Normative References 495 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 496 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 497 RFC2119, March 1997, 498 . 500 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 501 Resource Identifier (URI): Generic Syntax", STD 66, RFC 502 3986, DOI 10.17487/RFC3986, January 2005, 503 . 505 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 506 Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/ 507 RFC5234, January 2008, 508 . 510 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 511 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 512 2014, . 514 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 515 Protocol (HTTP/1.1): Message Syntax and Routing", RFC 516 7230, DOI 10.17487/RFC7230, June 2014, 517 . 519 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 520 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 521 10.17487/RFC7231, June 2014, 522 . 524 [W3C.REC-xml-20081126] 525 Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and 526 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth 527 Edition)", World Wide Web Consortium Recommendation REC- 528 xml-20081126, November 2008, 529 . 531 8.2. Informative References 533 [ISO-19757-2] 534 International Organization for Standardization, 535 "Information Technology --- Document Schema Definition 536 Languages (DSDL) --- Part 2: Grammar-based Validation --- 537 RELAX NG", ISO/IEC 19757-2, 2003. 539 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 540 Authoring and Versioning (WebDAV)", RFC 4918, DOI 541 10.17487/RFC4918, June 2007, 542 . 544 [RFC5988] Nottingham, M., "Web Linking", RFC 5988, DOI 10.17487/ 545 RFC5988, October 2010, 546 . 548 [RFC6694] Moonesamy, S., Ed., "The "about" URI Scheme", RFC 6694, 549 DOI 10.17487/RFC6694, August 2012, 550 . 552 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 553 Specifications and Registration Procedures", BCP 13, RFC 554 6838, DOI 10.17487/RFC6838, January 2013, 555 . 557 [RFC7303] Thompson, H. and C. Lilley, "XML Media Types", RFC 7303, 558 DOI 10.17487/RFC7303, July 2014, 559 . 561 [W3C.REC-html5-20141028] 562 Hickson, I., Berjon, R., Faulkner, S., Leithead, T., 563 Navara, E., O'Connor, E., and S. Pfeiffer, "HTML5", 564 World Wide Web Consortium Recommendation REC- 565 html5-20141028, October 2014, 566 . 568 [W3C.REC-rdfa-core-20130822] 569 Adida, B., Birbeck, M., McCarron, S., and I. Herman, "RDFa 570 Core 1.1 - Second Edition", World Wide Web Consortium 571 Recommendation REC-rdfa-core-20130822, August 2013, 572 . 574 [W3C.REC-xml-stylesheet-20101028] 575 Clark, J., Pieters, S., and H. Thompson, "Associating 576 Style Sheets with XML documents 1.0 (Second Edition)", 577 World Wide Web Consortium Recommendation REC-xml- 578 stylesheet-20101028, October 2010, 579 . 581 Appendix A. HTTP Problems and XML 583 Some HTTP-based APIs use XML [W3C.REC-xml-20081126] as their primary 584 format convention. Such APIs can express problem details using the 585 format defined in this appendix. 587 The RELAX NG schema [ISO-19757-2] for the XML format is as follows. 588 Keep in mind that this schema is only meant as documentation, and not 589 as a normative schema that captures all constraints of the XML 590 format. Also, it would be possible to use other XML schema languages 591 to define a similar set of constraints (depending on the features of 592 the chosen schema language). 594 default namespace ns = "urn:ietf:rfc:XXXX" 596 start = problem 598 problem = 599 element problem { 600 ( element type { xsd:anyURI }? 601 & element title { xsd:string }? 602 & element detail { xsd:string }? 603 & element status { xsd:positiveInteger }? 604 & element instance { xsd:anyURI }? ), 605 anyNsElement 606 } 608 anyNsElement = 609 ( element ns:* { anyNsElement | text } 610 | attribute * { text })* 612 The media type for this format is "application/problem+xml". 614 Extension arrays and objects are serialized into the XML format by 615 considering an element containing a child or children to represent an 616 object, except for elements that contain only child element(s) named 617 'i', which are considered arrays. For example, the XML version of 618 the example above appears in XML as follows: 620 HTTP/1.1 403 Forbidden 621 Content-Type: application/problem+xml 622 Content-Language: en 624 625 626 https://example.com/probs/out-of-credit 627 You do not have enough credit. 628 Your current balance is 30, but that costs 50. 629 https://example.net/account/12345/msgs/abc 630 30 631 632 https://example.net/account/12345 633 https://example.net/account/67890 634 635 637 Note that this format uses an XML Namespace. This is primarily to 638 allow embedding it into other XML-based formats; it does not imply 639 that it can or should be extended with elements or attributes in 640 other namespaces. The RELAX NG schema explicitly only allows 641 elements from the one namespace used in the XML format. Any 642 extension arrays and objects MUST be serialized into XML markup using 643 only that namespace. 645 When using the XML format, it is possible to embed an XML Processing 646 Instruction in the XML that instructs clients to transform the XML, 647 using the referenced XSLT code [W3C.REC-xml-stylesheet-20101028]. If 648 this code is transforming the XML into (X)HTML, then it is possible 649 to serve the XML format, and yet have clients capable of performing 650 the transformation display human-friendly (X)HTML that is rendered 651 and displayed at the client. Note that when using this method, it is 652 advisable to use XSLT 1.0, in order to maximize the number of clients 653 capable of executing the XSLT code. 655 Appendix B. Using Problem Details with Other Formats 657 In some situations, it can be advantageous to embed Problem Details 658 in formats other than those described here. For example, an API that 659 uses HTML [W3C.REC-html5-20141028] might want to also use HTML for 660 expressing its problem details. 662 Problem details can be embedded in other formats by either 663 encapsulating one of the existing serializations (JSON or XML) into 664 that format, or by translating the model of a Problem Detail (as 665 specified in Section 3) into the format's conventions. 667 For example, in HTML, a problem could be embedded by encapsulating 668 JSON in a script tag: 670 682 or by inventing a mapping into RDFa [W3C.REC-rdfa-core-20130822]. 684 This specification does not make specific recommendations regarding 685 embedding Problem Details in other formats; the appropriate way to 686 embed them depends both upon the format in use and application of 687 that format. 689 Authors' Addresses 691 Mark Nottingham 692 Akamai 694 Email: mnot@mnot.net 695 URI: http://www.mnot.net/ 697 Erik Wilde 699 Email: erik.wilde@dret.net 700 URI: http://dret.net/netdret/