|
487 | 487 | ## Remarks
|
488 | 488 | A part-level relationship defines an association between this part and a target part or resource. A part-level relationship can be one of two forms.
|
489 | 489 |
|
490 |
| -- Between a source <xref:System.IO.Packaging.PackagePart> to a target <xref:System.IO.Packaging.PackagePart> inside the <xref:System.IO.Packaging.Package>. |
491 |
| -
|
492 |
| -- Between a source <xref:System.IO.Packaging.PackagePart> to a target resource outside the package. |
| 490 | +- Between a source <xref:System.IO.Packaging.PackagePart> to a target <xref:System.IO.Packaging.PackagePart> inside the <xref:System.IO.Packaging.Package>. |
| 491 | +- Between a source <xref:System.IO.Packaging.PackagePart> to a target resource outside the package. |
493 | 492 |
|
494 | 493 | In a part-relationship the source part is considered the "owner" of the relationship. When the source part is deleted, all the relationships owned by the part are also deleted. The process of creating or deleting the relationship does not physically alter the target part or resource in any way.
|
495 | 494 |
|
|
503 | 502 |
|
504 | 503 | `relationshipType` must be a URI that is formed according to the [RFC 3986](https://tools.ietf.org/html/rfc3986) *Uniform Resource Identifier (URI) Generic Syntax* specification. Different package types can define different part-level relationship types. The following table shows the part-level `relationshipType` URIs defined for documents that conform to the *Open XML Paper Specification (XPS)*.
|
505 | 504 |
|
506 |
| -|XPS Document Part-Level Relationship|Relationship Type URI| |
507 |
| -|-------------------------------------------|---------------------------| |
508 |
| -|Digital Signature Definitions|`http://schemas.microsoft.com/xps/2005/06/signature-definitions`| |
509 |
| -|DiscardControl|`http://schemas.microsoft.com/xps/2005/06/discard-control`| |
510 |
| -|DocumentStructure|`http://schemas.microsoft.com/xps/2005/06/documentstructure`| |
511 |
| -|PrintTicket|`http://schemas.microsoft.com/xps/2005/06/printticket`| |
512 |
| -|Required Resource|`http://schemas.microsoft.com/xps/2005/06/required-resource`| |
513 |
| -|Restricted Font|`http://schemas.microsoft.com/xps/2005/06/restricted-font`| |
514 |
| -|StartPart|`http://schemas.microsoft.com/xps/2005/06/fixedrepresentation`| |
515 |
| -|StoryFragments|`http://schemas.microsoft.com/xps/2005/06/storyfragments`| |
| 505 | +| XPS Document Part-Level Relationship | Relationship Type URI | |
| 506 | +|--------------------------------------|------------------------------------------------------------------| |
| 507 | +| Digital Signature Definitions | `http://schemas.microsoft.com/xps/2005/06/signature-definitions` | |
| 508 | +| DiscardControl | `http://schemas.microsoft.com/xps/2005/06/discard-control` | |
| 509 | +| DocumentStructure | `http://schemas.microsoft.com/xps/2005/06/documentstructure` | |
| 510 | +| PrintTicket | `http://schemas.microsoft.com/xps/2005/06/printticket` | |
| 511 | +| Required Resource | `http://schemas.microsoft.com/xps/2005/06/required-resource` | |
| 512 | +| Restricted Font | `http://schemas.microsoft.com/xps/2005/06/restricted-font` | |
| 513 | +| StartPart | `http://schemas.microsoft.com/xps/2005/06/fixedrepresentation` | |
| 514 | +| StoryFragments | `http://schemas.microsoft.com/xps/2005/06/storyfragments` | |
516 | 515 |
|
517 | 516 | For more information about package relationships see section 1.3 of the *Open Packaging Conventions (OPC)* specification available for download at <https://www.ecma-international.org/publications-and-standards/standards/ecma-376/>.
|
518 | 517 |
|
|
596 | 595 | ## Remarks
|
597 | 596 | A part-level relationship defines an association between this part and a target part or resource. A part-level relationship can be one of two forms.
|
598 | 597 |
|
599 |
| -- Between a source <xref:System.IO.Packaging.PackagePart> to a target <xref:System.IO.Packaging.PackagePart> inside the <xref:System.IO.Packaging.Package>. |
600 |
| -
|
601 |
| -- Between a source <xref:System.IO.Packaging.PackagePart> to a target resource outside the package. |
| 598 | +- Between a source <xref:System.IO.Packaging.PackagePart> to a target <xref:System.IO.Packaging.PackagePart> inside the <xref:System.IO.Packaging.Package>. |
| 599 | +- Between a source <xref:System.IO.Packaging.PackagePart> to a target resource outside the package. |
602 | 600 |
|
603 | 601 | In a part-relationship the source part is considered the "owner" of the relationship. When the source part is deleted, all the relationships owned by the part are also deleted. The process of creating or deleting the relationship does not physically alter the target part or resource in any way.
|
604 | 602 |
|
|
614 | 612 |
|
615 | 613 | `relationshipType` must be a URI that is formed according to the [RFC 3986](https://tools.ietf.org/html/rfc3986) *Uniform Resource Identifier (URI) Generic Syntax* specification. Different package types can define different part-level relationship types. The following table shows the part-level `relationshipType` URIs defined for documents that conform to the *Open XML Paper Specification (XPS)*.
|
616 | 614 |
|
617 |
| -|XPS Document Part-Level Relationship|Relationship Type URI| |
618 |
| -|-------------------------------------------|---------------------------| |
619 |
| -|Digital Signature Definitions|http://schemas.microsoft.com/xps/2005/06/signature-definitions| |
620 |
| -|DiscardControl|http://schemas.microsoft.com/xps/2005/06/discard-control| |
621 |
| -|DocumentStructure|http://schemas.microsoft.com/xps/2005/06/documentstructure| |
622 |
| -|PrintTicket|http://schemas.microsoft.com/xps/2005/06/printticket| |
623 |
| -|Required Resource|http://schemas.microsoft.com/xps/2005/06/required-resource| |
624 |
| -|Restricted Font|http://schemas.microsoft.com/xps/2005/06/restricted-font| |
625 |
| -|StartPart|http://schemas.microsoft.com/xps/2005/06/fixedrepresentation| |
626 |
| -|StoryFragments|http://schemas.microsoft.com/xps/2005/06/storyfragments| |
| 615 | +| XPS Document Part-Level Relationship | Relationship Type URI | |
| 616 | +|--------------------------------------|----------------------------------------------------------------| |
| 617 | +| Digital Signature Definitions | http://schemas.microsoft.com/xps/2005/06/signature-definitions | |
| 618 | +| DiscardControl | http://schemas.microsoft.com/xps/2005/06/discard-control | |
| 619 | +| DocumentStructure | http://schemas.microsoft.com/xps/2005/06/documentstructure | |
| 620 | +| PrintTicket | http://schemas.microsoft.com/xps/2005/06/printticket | |
| 621 | +| Required Resource | http://schemas.microsoft.com/xps/2005/06/required-resource | |
| 622 | +| Restricted Font | http://schemas.microsoft.com/xps/2005/06/restricted-font | |
| 623 | +| StartPart | http://schemas.microsoft.com/xps/2005/06/fixedrepresentation | |
| 624 | +| StoryFragments | http://schemas.microsoft.com/xps/2005/06/storyfragments | |
627 | 625 |
|
628 | 626 | For more information about package relationships see section 1.3 of the *Open Packaging Conventions (OPC)* specification available for download at <https://www.ecma-international.org/publications-and-standards/standards/ecma-376/>.
|
629 | 627 |
|
|
803 | 801 | <format type="text/markdown"><). |
| 804 | + `id` must be a valid XML identifier. The `id` type is xsd:ID and must follow the naming conventions prescribed in the *XML Schema Part 2: Datatypes* specification (see [https://www.w3.org/TR/xmlschema-2/#ID](https://www.w3.org/TR/xmlschema-2/#ID)). |
807 | 805 |
|
808 | 806 | You can use the <xref:System.IO.Packaging.PackagePart.RelationshipExists%2A> method to determine if a relationship with a specified <xref:System.IO.Packaging.PackageRelationship.Id%2A> is owned by this part.
|
809 | 807 |
|
|
813 | 811 | <paramref name="id" /> is <see langword="null" />.</exception>
|
814 | 812 | <exception cref="T:System.Xml.XmlException">
|
815 | 813 | <paramref name="id" /> is not a valid XML identifier.</exception>
|
816 |
| - <exception cref="T:System.ArgumentException"> |
817 |
| - <paramref name="relationshipType" /> is an empty string.</exception> |
818 | 814 | <exception cref="T:System.InvalidOperationException">The part has been deleted.
|
819 | 815 |
|
820 | 816 | -or-
|
|
0 commit comments