ビジネスオブジェクトに対して(Visual Studio 2010のXMLエディタを使用して)スキーマを定義する場合、外部の名前空間をインポートするにはどうすればよいですか?私はGoogle Commerce Searchのスキーマを拡張していますが、名前空間接頭辞の要素を定義するにはどうすればよいですか?例えば.xsdはhttp://www.w3.org/2007/appにありますか?
<app:edited>2012-01-17T17:22:05.182Z</app:edited>
Visual Studioは、私がhttp://www.w3.org/2007/app
名前空間のための.xsdファイルをインポートする必要があるかもしれません示唆:app
名前空間に属する私の製品データ、一つの要素、edited
、のいくつかを照会するときのように見えます。 Googleサービスフィードに既に含まれているその他の名前空間の他の.xsdファイルを探す必要がありますか?例えばxmlns:sc
およびxmlns:scp
これらはどこにありますか?それとも私はこれについて完全に間違っているのだろうか?
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="entry"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2005/Atom"
elementFormDefault="qualified"
xmlns="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app"
xmlns:sc="http://schemas.google.com/structuredcontent/2009"
xmlns:scp="http://schemas.google.com/structuredcontent/2009/products">
<xs:element name="entry">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xs:anyURI"></xs:element>
<xs:element name="published" type="xs:date"></xs:element>
<xs:element name="updated" type="xs:date"></xs:element>
<xs:element name="title" type="xs:string"></xs:element>
<!-- how do I define the <app:edited type="date" /> element here?? -->
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
私の元の質問に戻る - http://www.w3.org/2007/appの.xsdファイルはどこですか?私はそれを自分で作らなければなりませんか?それはw3.orgでホストされていますか? –
Atom Publishing ProtocolにはRelaxNGコンパクトスキーマがあり、XSDスキーマはないようです。この場合、あなたは運がありません。 Trangのようなツールを使ってRelaxNGスキーマをXSDに変換することができます:http://www.thaiopensource.com/relaxng/trang.html –
「http://www.w3.org/2007」のRelaxNGコンパクトスキーマはどこにありますか/ app'?この情報はどこにありますか? –