Hello again.
I want to ask some questions relating to xml schema and content model.
I want to save some other informations relating to an object. Therefore I
create a datastream with Control Group X to hold those informations. However
when I want to restrict the data by using xml schame, it just doesn't work. I
found down that the xmlContentType in the foxml-1.1 file has
processContent="skip" so it ignores the validation of the xml schame. I wonder
if there is other way to restrict the xml data in datastream?
The code below is the datastream and its schame i created.
Another question is : How to create a Content Model? I've read guides on
official site but i haven't found a way to create it. There are only some
guides about creating sDef and sDep. Can the content model restrict content of
a datastream?
A bit about my project, I'm trying to create a digital library that manage
books, magazines and theses. They can be downloadable or for online reading (if
the permission to download is set to false then no printing or downloading is
allowed and only online reading is allowed ). And i still wonder what is DC
for? is DC enough to describe information relating to books/magazines/theses
(especially for theses)? Should i add more information?
Sorry for my bad english.
(Btw, how can i reply a topic ? i know it's kinda a silly question...)
Thanks in advance guys~ (I'm kinda bad at design, so i hope you guys can
suggest me a better way).
---------------------------------------------
<foxml:datastream ID="OTHERPROPERTIES" STATE="A" CONTROL_GROUP="X"
VERSIONABLE="false">
<foxml:datastreamVersion ID="OTHERPROPERTIES.1" LABEL="Other properties of the
book" CREATED="2010-05-06T03:20:34.312Z" MIMETYPE="text/xml" SIZE="383">
<foxml:xmlContent>
<properties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:/E:/4thYear/2ndTerm/Document/FedoraEditedFile/SachOP_XSD.xsd">
<DuocDownload>false</DuocDownload> <!-- Is the pdf file downloadable ?-->
<Gia>10000</Gia> <!-- Price of the book -->
<SoTrangSach>22</SoTrangSach> <!-- Number of pages -->
<DDC>005.47</DDC> <!-- DDC -->
<CuonThu>2</CuonThu> <!-- Volume -->
</properties>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
----------------------------------------------
<!-- The schema -->
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="properties" type="OtherPropertyType"></xs:element>
<xs:complexType name="OtherPropertyType">
<xs:sequence>
<xs:element name="DuocDownload" minOccurs="1" maxOccurs="1"
type="xs:boolean"> </xs:element>
<xs:element name="Gia" minOccurs="1" maxOccurs="1"
type="xs:positiveInteger"></xs:element>
<xs:element name="SoTrangSach" minOccurs="1" maxOccurs="1"
type="xs:positiveInteger"></xs:element>
<xs:element name="DDC" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern
value="([0-9]{3})\.([0-9]{1,})"></xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CuonThu" type="xs:positiveInteger" minOccurs="0"
maxOccurs="1"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
---------------------------------------------
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969------------------------------------------------------------------------------
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users