다음을 통해 공유


ProductModel.CatalogDescription xml 열 정보

설명을 위해 사용된 AdventureWorks2008R2 예제 데이터베이스에서 자전거 제품 모델에 대한 카탈로그 설명은 CatalogDescription 열에 XML로 저장됩니다. 각 제품 모델에는 몇 가지 개별 제품이 포함될 수 있습니다. 예를 들어 Road 450은 Road 450 Red 25 및 Road 450 Green 48과 같은 일부 자전거가 포함된 자전거 제품 모델입니다. 제품 모델에서 자전거 간의 주요한 차이점은 색과 크기입니다.

이러한 제품 설명을 쿼리하고 XSL 변환을 적용하고 온라인 카탈로그를 생성할 수 있습니다. CatalogDescription 열에 저장되는 카탈로그 정보에서는 업계 표준 스키마가 사용되지 않습니다. 따라서 필요한 경우 업계 표준 XML 제품 카탈로그를 작성하도록 쿼리를 작성할 수 있습니다.

이것은 형식화된 xml 열입니다. 이 열에 사용된 스키마는 이 Microsoft 웹 사이트에서 볼 수 있습니다. 이 열에는 ProductModelDescription 및 ProductModelWarrAndMain XML 스키마가 사용됩니다.

예제 XML 인스턴스

이 예제 XML 인스턴스는 ProductModel.CatalogDescription열에 저장됩니다.

<?xml-stylesheet href="ProductDescription.xsl" type="text/xsl"?>
<p1:ProductDescription xmlns:p1="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription" xmlns:wm="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain" xmlns:wf="https://www.adventure-works.com/schemas/OtherFeatures" xmlns:html="http://www.w3.org/1999/xhtml" ProductModelID="19" ProductModelName="Mountain 100">
  <p1:Summary>
    <html:p>Our top-of-the-line competition mountain bike. Performance-enhancing options include the innovative HL Frame, super-smooth front suspension, and traction for all terrain.</html:p>
  </p1:Summary>
  <p1:Manufacturer>
    <p1:Name>Adventure Works</p1:Name>
    <p1:Copyright>2002</p1:Copyright>
    <p1:ProductURL>HTTP://www.Adventure-works.com</p1:ProductURL>
  </p1:Manufacturer>
  <p1:Features>These are the product highlights. 
                 <wm:Warranty><wm:WarrantyPeriod>3 years</wm:WarrantyPeriod><wm:Description>parts and labor</wm:Description></wm:Warranty><wm:Maintenance><wm:NoOfYears>10 years</wm:NoOfYears><wm:Description>maintenance contract available through your dealer or any Adventure Works retail store.</wm:Description></wm:Maintenance><wf:wheel>High performance wheels.</wf:wheel><wf:saddle><html:i>Anatomic design</html:i> and made from durable leather for a full-day of riding in comfort.</wf:saddle><wf:pedal><html:b>Top-of-the-line</html:b> clipless pedals with adjustable tension.</wf:pedal><wf:BikeFrame>Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps.</wf:BikeFrame><wf:crankset> Triple crankset; alumunim crank arm; flawless shifting. </wf:crankset></p1:Features>
  <!-- add one or more of these elements... one for each specific product in this product model -->
  <p1:Picture>
    <p1:Angle>front</p1:Angle>
    <p1:Size>small</p1:Size>
    <p1:ProductPhotoID>118</p1:ProductPhotoID>
  </p1:Picture>
  <!-- add any tags in <specifications> -->
  <p1:Specifications> These are the product specifications.
                   <Material>Almuminum Alloy</Material><Color>Available in most colors</Color><ProductLine>Mountain bike</ProductLine><Style>Unisex</Style><RiderExperience>Advanced to Professional riders</RiderExperience></p1:Specifications>
</p1:ProductDescription>

더 많은 XML 인스턴스를 찾으려면 다음 쿼리를 실행합니다.

USE AdventureWorks2008R2;
GO
SELECT CatalogDescription
FROM   Production.ProductModel
WHERE CatalogDescription IS NOT NULL;

참고 항목

개념