mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Refactored XForms samples to provide one central location for all XForms tests and examples, continuous build also now builds a distribute archive of all the tests (except unit tests) and examples for use by QA, SEs and the installer
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13746 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -62,7 +62,7 @@ public class Schema2XFormsTest
|
||||
public void testOneStringTestWithEmptyInstanceDocument()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/one-string-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/one-string-test.xsd");
|
||||
final Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "one-string-test");
|
||||
this.runXForm(xformsDocument);
|
||||
final JXPathContext xpathContext = JXPathContext.newContext(xformsDocument);
|
||||
@@ -82,7 +82,7 @@ public class Schema2XFormsTest
|
||||
throws Exception
|
||||
{
|
||||
final Document instanceDocument = XMLUtil.parse("<one-string-test><string>test</string></one-string-test>");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/one-string-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/one-string-test.xsd");
|
||||
final Document xformsDocument = Schema2XFormsTest.buildXForm(instanceDocument, schemaDocument, "one-string-test");
|
||||
this.runXForm(xformsDocument);
|
||||
final JXPathContext xpathContext = JXPathContext.newContext(xformsDocument);
|
||||
@@ -100,7 +100,7 @@ public class Schema2XFormsTest
|
||||
public void testNumbers()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/number-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/number-test.xsd");
|
||||
final Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "number-test");
|
||||
System.err.println("generated xform " + XMLUtil.toString(xformsDocument));
|
||||
final Element[] repeatedNumbers = Schema2XFormsTest.resolveXFormsControl(xformsDocument, "/number-test/repeated_numbers");
|
||||
@@ -119,7 +119,7 @@ public class Schema2XFormsTest
|
||||
public void testRepeatConstraintsTest()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/repeat-constraints-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/repeat-constraints-test.xsd");
|
||||
final Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "repeat-constraints-test");
|
||||
Schema2XFormsTest.assertRepeatProperties(xformsDocument,
|
||||
"/repeat-constraints-test/one-to-inf",
|
||||
@@ -181,7 +181,7 @@ public class Schema2XFormsTest
|
||||
public void testRootElementWithExtension()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/root-element-with-extension-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/root-element-with-extension-test.xsd");
|
||||
Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "without-extension-test");
|
||||
this.runXForm(xformsDocument);
|
||||
assertEquals(3, xformsDocument.getElementsByTagNameNS(NamespaceConstants.XFORMS_NS, "input").getLength());
|
||||
@@ -200,7 +200,7 @@ public class Schema2XFormsTest
|
||||
public void testSwitch()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/switch-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/switch-test.xsd");
|
||||
final Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "switch-test");
|
||||
this.runXForm(xformsDocument);
|
||||
// assertEquals(3, xformsDocument.getElementsByTagNameNS(NamespaceConstants.XFORMS_NS, "input").getLength());
|
||||
@@ -218,7 +218,7 @@ public class Schema2XFormsTest
|
||||
public void testDerivedType()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/derived-type-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/derived-type-test.xsd");
|
||||
final Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "derived-type-test");
|
||||
this.runXForm(xformsDocument);
|
||||
LOGGER.debug("generated xforms " + XMLUtil.toString(xformsDocument));
|
||||
@@ -338,7 +338,7 @@ public class Schema2XFormsTest
|
||||
public void testRecursive()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/recursive-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/recursive-test.xsd");
|
||||
Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "non-recursive-test");
|
||||
this.runXForm(xformsDocument);
|
||||
try
|
||||
@@ -364,7 +364,7 @@ public class Schema2XFormsTest
|
||||
public void testAnnotation()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/annotation-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/annotation-test.xsd");
|
||||
Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "annotation-test");
|
||||
this.runXForm(xformsDocument);
|
||||
System.err.println("generated xform " + XMLUtil.toString(xformsDocument));
|
||||
@@ -399,7 +399,7 @@ public class Schema2XFormsTest
|
||||
public void testConstraint()
|
||||
throws Exception
|
||||
{
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/automated/constraint-test.xsd");
|
||||
final Document schemaDocument = this.loadTestResourceDocument("xforms/unit-tests/constraint-test.xsd");
|
||||
Document xformsDocument = Schema2XFormsTest.buildXForm(null, schemaDocument, "constraint-test");
|
||||
final ChibaBean chibaBean = this.runXForm(xformsDocument);
|
||||
final LinkedList<XMLEvent> events = new LinkedList<XMLEvent>();
|
||||
|
@@ -1,294 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:glob="http://apply.grants.gov/system/Global-V1.0" xmlns:att="http://apply.grants.gov/system/Attachments-V1.0" xmlns:globLib="http://apply.grants.gov/system/GlobalLibrary-V2.0" xmlns:RR_SF424="http://apply.grants.gov/forms/RR_SF424-V1.1" targetNamespace="http://apply.grants.gov/forms/RR_SF424-V1.1" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.1">
|
||||
<xs:import namespace="http://apply.grants.gov/system/GlobalLibrary-V2.0" schemaLocation="http://apply.grants.gov/system/schemas/GlobalLibrary-V2.0.xsd"/>
|
||||
<xs:import namespace="http://apply.grants.gov/system/Global-V1.0" schemaLocation="http://apply.grants.gov/system/schemas/Global-V1.0.xsd"/>
|
||||
<xs:import namespace="http://apply.grants.gov/system/Attachments-V1.0" schemaLocation="http://apply.grants.gov/system/schemas/Attachments-V1.0.xsd"/>
|
||||
<xs:element name="RR_SF424">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="SubmissionTypeCode" type="RR_SF424:SubmissionTypeDataType"/>
|
||||
<xs:element name="SubmittedDate" type="xs:date" minOccurs="0"/>
|
||||
<xs:element name="ApplicantID" type="globLib:ApplicantIDDataType" minOccurs="0"/>
|
||||
<xs:element name="StateReceivedDate" type="xs:date" minOccurs="0"/>
|
||||
<xs:element name="StateID" type="globLib:StateIDDataType" minOccurs="0"/>
|
||||
<xs:element name="FederalID" type="globLib:FederalIDDataType" minOccurs="0"/>
|
||||
<xs:element name="ApplicantInfo">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="OrganizationInfo" type="globLib:OrganizationDataType"/>
|
||||
<xs:element name="ContactPersonInfo">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Name" type="globLib:HumanNameDataType"/>
|
||||
<xs:element name="Phone" type="globLib:TelephoneNumberDataType"/>
|
||||
<xs:element name="Fax" type="globLib:TelephoneNumberDataType" minOccurs="0"/>
|
||||
<xs:element name="Email" type="globLib:EmailDataType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="EmployerID">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="9"/>
|
||||
<xs:maxLength value="30"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="ApplicantType">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ApplicantTypeCode" type="globLib:ApplicantTypeCodeDataType"/>
|
||||
<xs:element name="ApplicantTypeCodeOtherExplanation" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="50"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="SmallBusinessOrganizationType" nillable="true" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="isWomenOwned" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="globLib:YesNoDataType"/>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="isSociallyEconomicallyDisadvantaged" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="globLib:YesNoDataType"/>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ApplicationType">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ApplicationTypeCode" type="RR_SF424:ApplicationTypeCodeDataType"/>
|
||||
<xs:element name="RevisionCode" type="RR_SF424:RevisionTypeCodeDataType" minOccurs="0"/>
|
||||
<xs:element name="RevisionCodeOtherExplanation" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="45"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="isOtherAgencySubmission" type="globLib:YesNoDataType"/>
|
||||
<xs:element name="OtherAgencySubmissionExplanation" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="20"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="FederalAgencyName" type="globLib:AgencyNameDataType"/>
|
||||
<xs:element name="CFDANumber" type="globLib:CFDANumberDataType" minOccurs="0"/>
|
||||
<xs:element name="ActivityTitle" type="globLib:ProgramActivityTitleDataType" minOccurs="0"/>
|
||||
<xs:element name="ProjectTitle" type="globLib:ProjectTitleDataType"/>
|
||||
<xs:element name="Location">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="45"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="ProposedProjectPeriod">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ProposedStartDate" type="xs:date"/>
|
||||
<xs:element name="ProposedEndDate" type="xs:date"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="CongressionalDistrict">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ApplicantCongressionalDistrict" type="globLib:CongressionalDistrictDataType"/>
|
||||
<xs:element name="ProjectCongressionalDistrict" type="globLib:CongressionalDistrictDataType"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="PDPIContactInfo" type="RR_SF424:OrganizationContactPersonDataType"/>
|
||||
<xs:element name="EstimatedProjectFunding">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="TotalEstimatedAmount" type="globLib:BudgetTotalAmountDataType"/>
|
||||
<xs:element name="TotalfedNonfedrequested" type="globLib:BudgetTotalAmountDataType"/>
|
||||
<xs:element name="EstimatedProgramIncome" type="globLib:BudgetTotalAmountDataType"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="StateReview">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="StateReviewCodeType" type="RR_SF424:StateReviewCodeTypeDataType"/>
|
||||
<xs:element name="StateReviewDate" type="xs:date" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="TrustAgree" type="globLib:YesNoDataType"/>
|
||||
<xs:element name="AORInfo" type="RR_SF424:AORInfoType"/>
|
||||
<xs:element name="PreApplicationAttachment" type="att:AttachedFileDataType" minOccurs="0"/>
|
||||
<xs:element name="AdditionalCongressionalDistricts" type="att:AttachedFileDataType" minOccurs="0"/>
|
||||
<xs:element name="AOR_Signature" type="globLib:SignatureDataType"/>
|
||||
<xs:element name="AOR_SignedDate" type="xs:date"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="FormVersion" type="globLib:FormVersionDataType" use="required" fixed="1.1"/>
|
||||
</xs:complexType>
|
||||
<!--
|
||||
<xs:key name="ApplicantTypeCodeKey">
|
||||
<xs:selector xpath="./RR_SF424:ApplicantType"/>
|
||||
<xs:field xpath="RR_SF424:ApplicantTypeCode"/>
|
||||
</xs:key>
|
||||
<xs:keyref name="ApplicantTypeCodeOtherKeyRef" refer="RR_SF424:ApplicantTypeCodeKey">
|
||||
<xs:selector xpath="./RR_SF424:ApplicantType/RR_SF424:ApplicantTypeCodeOtherExplanation"/>
|
||||
<xs:field xpath="@ApplicantTypeCode"/>
|
||||
</xs:keyref>
|
||||
<xs:keyref name="ApplicantTypeCodeSmallBusinessKeyRef" refer="RR_SF424:ApplicantTypeCodeKey">
|
||||
<xs:selector xpath="./RR_SF424:ApplicantType/RR_SF424:SmallBusinessOrganizationType"/>
|
||||
<xs:field xpath="@ApplicantTypeCode"/>
|
||||
</xs:keyref>
|
||||
<xs:key name="ApplicationTypeCodeKey">
|
||||
<xs:selector xpath="./RR_SF424:ApplicationType"/>
|
||||
<xs:field xpath="RR_SF424:ApplicationTypeCode"/>
|
||||
</xs:key>
|
||||
<xs:keyref name="ApplicationTypeCodeKeyRef" refer="RR_SF424:ApplicationTypeCodeKey">
|
||||
<xs:selector xpath="./RR_SF424:ApplicationType/RR_SF424:RevisionCode"/>
|
||||
<xs:field xpath="@ApplicationTypeCode"/>
|
||||
</xs:keyref>
|
||||
<xs:key name="isOtherAgencySubmissionKey">
|
||||
<xs:selector xpath="./RR_SF424:ApplicationType"/>
|
||||
<xs:field xpath="RR_SF424:isOtherAgencySubmission"/>
|
||||
</xs:key>
|
||||
<xs:keyref name="isOtherAgencySubmissionKeyRef" refer="RR_SF424:isOtherAgencySubmissionKey">
|
||||
<xs:selector xpath="./RR_SF424:ApplicationType/RR_SF424:OtherAgencySubmissionExplanation"/>
|
||||
<xs:field xpath="@isOtherAgencySubmission"/>
|
||||
</xs:keyref>
|
||||
<xs:key name="StateReviewCodeTypeKey">
|
||||
<xs:selector xpath="./RR_SF424:StateReview"/>
|
||||
<xs:field xpath="RR_SF424:StateReviewCodeType"/>
|
||||
</xs:key>
|
||||
<xs:keyref name="StateReviewCodeTypeKeyRef" refer="RR_SF424:StateReviewCodeTypeKey">
|
||||
<xs:selector xpath="./RR_SF424:StateReview/RR_SF424:StateReview"/>
|
||||
<xs:field xpath="@StateReviewCodeType"/>
|
||||
</xs:keyref>
|
||||
-->
|
||||
</xs:element>
|
||||
<xs:simpleType name="SubmissionTypeDataType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Preapplication"/>
|
||||
<xs:enumeration value="Application"/>
|
||||
<xs:enumeration value="Change/Corrected Application"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!--
|
||||
|
||||
<xs:simpleType name="ApplicantTypeCodeDataType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="A: State Government"/>
|
||||
<xs:enumeration value="B: County Government"/>
|
||||
<xs:enumeration value="C: City or Township Government"/>
|
||||
<xs:enumeration value="D: Special District Governments"/>
|
||||
<xs:enumeration value="E: Independent School District"/>
|
||||
<xs:enumeration value="F: State-Controlled Institution of Higher Education"/>
|
||||
<xs:enumeration value="G: Native American Tribal Government (Federally Recognized)"/>
|
||||
<xs:enumeration value="H: Public/Indian Housing Authority"/>
|
||||
<xs:enumeration value="I: Native American Tribal Organization (other than Federally recognized)"/>
|
||||
<xs:enumeration value="J: Nonprofit with 501C3 IRS status (other than Institution of Higher Education)"/>
|
||||
<xs:enumeration value="K: Nonprofit without 501C3 IRS status (other than Institution of Higher Education)"/>
|
||||
<xs:enumeration value="L: Private Institution of Higher Education"/>
|
||||
<xs:enumeration value="M: Individual"/>
|
||||
<xs:enumeration value="N: For-profit Organization (other than small business)"/>
|
||||
<xs:enumeration value="O: Small Business"/>
|
||||
<xs:enumeration value="P: Other (specify)"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>-->
|
||||
<xs:simpleType name="ApplicationTypeCodeDataType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="New"/>
|
||||
<xs:enumeration value="Resubmission"/>
|
||||
<xs:enumeration value="Renewal"/>
|
||||
<xs:enumeration value="Continuation"/>
|
||||
<xs:enumeration value="Revision"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="RevisionTypeCodeDataType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="A"/>
|
||||
<xs:enumeration value="B"/>
|
||||
<xs:enumeration value="C"/>
|
||||
<xs:enumeration value="D"/>
|
||||
<xs:enumeration value="E"/>
|
||||
<xs:enumeration value="AC"/>
|
||||
<xs:enumeration value="AD"/>
|
||||
<xs:enumeration value="BC"/>
|
||||
<xs:enumeration value="BD"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="StateReviewCodeTypeDataType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Y: Yes"/>
|
||||
<xs:enumeration value="Program is not covered by E.O. 12372"/>
|
||||
<xs:enumeration value="Program has not been selected by state for review"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:complexType name="OrganizationContactPersonDataType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Name" type="globLib:HumanNameDataType"/>
|
||||
<xs:element name="Title" type="globLib:HumanTitleDataType" minOccurs="0"/>
|
||||
<xs:element name="Address" type="globLib:AddressDataType"/>
|
||||
<xs:element name="Phone" type="globLib:TelephoneNumberDataType"/>
|
||||
<xs:element name="Fax" type="globLib:TelephoneNumberDataType" minOccurs="0"/>
|
||||
<xs:element name="Email" type="globLib:EmailDataType"/>
|
||||
<xs:element name="OrganizationName" type="globLib:OrganizationNameDataType"/>
|
||||
<xs:element name="DepartmentName" type="globLib:DepartmentNameDataType" minOccurs="0"/>
|
||||
<xs:element name="DivisionName" type="globLib:DivisionNameDataType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- ================================================ -->
|
||||
<!-- AORInfoType -->
|
||||
<!-- The AORInfoType is a re-definition of the global -->
|
||||
<!-- library's ContactPersonDataType. Restriction -->
|
||||
<!-- based inheritence could not be used since each -->
|
||||
<!-- element in the restricted derivation would have -->
|
||||
<!-- a different namespace from the base type, making -->
|
||||
<!-- it an entirely different element that cannot be -->
|
||||
<!-- mapped back to its base particle. This violates -->
|
||||
<!-- the schema specification for "Particle Derivation-->
|
||||
<!-- OK (All:All,Sequence:Sequence - Recurse)" line -->
|
||||
<!-- 2.1, for more information see the following link:-->
|
||||
<!-- http://www.w3.org/TR/xmlschema-1/#rcase-Recurse -->
|
||||
<!-- ================================================ -->
|
||||
<xs:complexType name="AORInfoType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Name" type="globLib:HumanNameDataType"/>
|
||||
<xs:element name="Title" type="globLib:HumanTitleDataType"/>
|
||||
<xs:element name="Address" type="globLib:AddressDataType"/>
|
||||
<xs:element name="Phone" type="globLib:TelephoneNumberDataType"/>
|
||||
<xs:element name="Fax" type="globLib:TelephoneNumberDataType" minOccurs="0"/>
|
||||
<xs:element name="Email" type="globLib:EmailDataType"/>
|
||||
<xs:element name="OrganizationName" type="globLib:OrganizationNameDataType"/>
|
||||
<xs:element name="DepartmentName" type="globLib:DepartmentNameDataType" minOccurs="0"/>
|
||||
<xs:element name="DivisionName" type="globLib:DivisionNameDataType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:eyestreet="http://www.eyestreet.com/eyestreet"
|
||||
targetNamespace="http://www.eyestreet.com/eyestreet"
|
||||
elementFormDefault="qualified">
|
||||
<xs:element name="footer">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="footer-images" minOccurs="1" maxOccurs="10">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="image" type="xs:string"/>
|
||||
<xs:element name="url" type="xs:string"/>
|
||||
<xs:element name="image-alt" type="xs:string"/>
|
||||
<xs:element name="image-width" type="xs:string"/>
|
||||
<xs:element name="image-height" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="footer-text" type="xs:anyType" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
@@ -1,80 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:alfresco="http://www.alfresco.org/alfresco"
|
||||
targetNamespace="http://www.alfresco.org/alfresco"
|
||||
elementFormDefault="qualified">
|
||||
<xs:element name="ist-topic">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
||||
<xs:element name="page_title" type="xs:string"/>
|
||||
<xs:element name="image" type="xs:string"/>
|
||||
<xs:element name="page_intro" type="xs:anyType"/>
|
||||
|
||||
<!-- announcements section title is an image. not text
|
||||
<xs:element name="announcement_title" type="xs:string" default="Announcements" minOccurs="0"/>
|
||||
-->
|
||||
<xs:element name="announcement" minOccurs="1" maxOccurs="3">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="title_link" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="content" type="xs:anyType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="left_column_title" type="xs:string" default="About this Topic"/>
|
||||
<xs:element name="left_column" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle_link" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="content" type="xs:anyType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="right_column_section_1_title" type="xs:string" default="Documentation"/>
|
||||
<xs:element name="right_column_section_1" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle_link" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="content" type="xs:anyType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="right_column_section_2_title" type="xs:string" default="Related Services"/>
|
||||
<xs:element name="right_column_section_2" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle_link" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="content" type="xs:anyType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="right_column_section_3_title" type="xs:string" default="Support Resources"/>
|
||||
<xs:element name="right_column_section_3" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="subtitle_link" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="content" type="xs:anyType" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
||||
|
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="shiporder">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="orderperson" type="xs:string"/>
|
||||
<xs:element name="shipto">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string"/>
|
||||
<xs:element name="address" type="xs:string"/>
|
||||
<xs:element name="city" type="xs:string"/>
|
||||
<xs:element name="country" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="item" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:string"/>
|
||||
<xs:element name="note" type="xs:string" minOccurs="0"/>
|
||||
<xs:element name="quantity" type="xs:positiveInteger"/>
|
||||
<xs:element name="price" type="xs:decimal"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="orderid" type="xs:string" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="process-unit">
|
||||
<xs:complexType >
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString"/>
|
||||
<xs:element name="introduction" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element type="xs:anyURI" name="workflow-diagram"/>
|
||||
<xs:element name="goal" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="objectives" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="approach" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="supporting-process-units" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--W3C Schema generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="title" type="xs:normalizedString"/>
|
||||
<xs:element name="text" type="xs:string"/>
|
||||
<xs:element name="picture" type="xs:anyURI"/>
|
||||
<xs:element name="heading" type="xs:normalizedString"/>
|
||||
<xs:element name="document">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="ContentHeadingMain"/>
|
||||
<xs:element ref="ContentHeading"/>
|
||||
<xs:element ref="Features"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Features">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="heading"/>
|
||||
<xs:element ref="ContentFeature" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ContentHeadingMain">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="title" type="xs:normalizedString" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ContentHeading">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="title"/>
|
||||
<xs:element ref="text"/>
|
||||
<xs:element ref="picture"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ContentFeature">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="text"/>
|
||||
<xs:element ref="picture"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
@@ -1,6 +0,0 @@
|
||||
<note important="true">
|
||||
<to>me</to>
|
||||
<from>you</from>
|
||||
<subject>this is a very important note</subject>
|
||||
<body>foo</body>
|
||||
</note>
|
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
|
||||
Licensed under the Mozilla Public License version 1.1
|
||||
with a permitted attribution clause. You may obtain a
|
||||
copy of the License at
|
||||
|
||||
http://www.alfresco.org/legal/license.txt
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
either express or implied. See the License for the specific
|
||||
language governing permissions and limitations under the
|
||||
License.
|
||||
|
||||
Describes a press release and related assets.
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:pr="http://www.alfresco.org/alfresco/pr"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/pr"
|
||||
elementFormDefault="qualified">
|
||||
<!-- defines the form for creating a company footer -->
|
||||
<xs:element name="company_footer">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString"/>
|
||||
<xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,151 @@
|
||||
<#ftl ns_prefixes={"D":"http://www.alfresco.org/alfresco/article","xsi":"http://www.w3.org/2001/XMLSchema-instance"}>
|
||||
<style>
|
||||
.article_details {
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
font-family: helvetica;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.article_title{
|
||||
padding: 8px;
|
||||
font-size: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.article_author {
|
||||
background: #fff;
|
||||
border: 1px solid #e2e1e1;
|
||||
position: relative;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.article_author_picture {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 80px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.article_author_name {
|
||||
}
|
||||
|
||||
.article_teaser {
|
||||
clear: left;
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
.article_tags {
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
.article_pages {
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
.article_page_picture_left {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 200px;
|
||||
padding-right: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.article_page_picture_right {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 200px;
|
||||
padding-left: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.article_page_picture {
|
||||
width: 200px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.article_page_title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.article_related {
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
.legal_text {
|
||||
font-style: italic;
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="article_details">
|
||||
|
||||
<div class="article_title">
|
||||
${article.title}
|
||||
</div>
|
||||
|
||||
<div class="article_author">
|
||||
<#if article.author[0]??>
|
||||
<#list article.author as author>
|
||||
<#include "${author?replace('.xml', '-details.html')}" parse=false>
|
||||
</#list>
|
||||
</#if>
|
||||
</div>
|
||||
|
||||
<div class="article_teaser">
|
||||
<span>${article.location} ${article.date}</span> - ${article.teaser}
|
||||
</div>
|
||||
<div class="article_tags">
|
||||
<#if article.tag[0]??>
|
||||
<b>Tags: </b>
|
||||
<#list article.tag as tag>
|
||||
${tag};
|
||||
</#list>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="article_pages">
|
||||
<#list article.page as page>
|
||||
<#if page.page_title[0]??>
|
||||
<div class="article_page_title">${page.page_title}</div>
|
||||
</#if>
|
||||
<#if page.page_picture[0]??>
|
||||
<#if page.page_picture.image["@xsi:nil"] == "false">
|
||||
<#if page_index % 2 == 1>
|
||||
<div class="article_page_picture_left">
|
||||
<img src="${page.page_picture.image}" class="article_page_picture"/>
|
||||
<#if page.page_picture.caption["@xsi:nil"] == "false">
|
||||
<div>${page.page_picture.caption}</div>
|
||||
</#if>
|
||||
</div>
|
||||
<#else>
|
||||
<div class="article_page_picture_right">
|
||||
<img src="${page.page_picture.image}" class="article_page_picture"/>
|
||||
<#if page.page_picture.caption["@xsi:nil"] == "false">
|
||||
<div>${page.page_picture.caption}</div>
|
||||
</#if>
|
||||
</div>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
${page.page_body}
|
||||
</#list>
|
||||
</div>
|
||||
<div class="article_related">
|
||||
<div><b>Related</b></div>
|
||||
<#if article.related[0]??>
|
||||
<div>
|
||||
<ul>
|
||||
<#list article.related as related>
|
||||
<li><a href="${related.item_link}">${related.item_label}</a>
|
||||
</#list>
|
||||
</ul>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="legal_text">
|
||||
<#if article.include_legal_text == "true">
|
||||
<#include "/legal.html" parse=false>
|
||||
</#if>
|
||||
</div>
|
||||
|
||||
|
@@ -0,0 +1,89 @@
|
||||
<#ftl ns_prefixes={"D":"http://www.alfresco.org/alfresco/article","xsi":"http://www.w3.org/2001/XMLSchema-instance"}>
|
||||
<style>
|
||||
.article_details {
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
font-family: helvetica;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.article_title{
|
||||
padding: 8px;
|
||||
font-size: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.article_author {
|
||||
background: #fff;
|
||||
border: 1px solid #e2e1e1;
|
||||
position: relative;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.article_author_picture {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 80px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.article_author_name {
|
||||
}
|
||||
|
||||
.article_teaser {
|
||||
clear: left;
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
.article_tags {
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
.article_pages {
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
.article_page_picture_left {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 200px;
|
||||
padding-right: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.article_page_picture_right {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 200px;
|
||||
padding-left: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.article_page_picture {
|
||||
width: 200px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.article_related {
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
</style>
|
||||
<div class="article_details">
|
||||
|
||||
<div class="article_title">
|
||||
${article.title}
|
||||
</div>
|
||||
|
||||
<div class="article_author">
|
||||
<#if article.author[0]??>
|
||||
<#list article.author as author>
|
||||
<#include "${author?replace('.xml', '-details.html')}" parse=false>
|
||||
</#list>
|
||||
</#if>
|
||||
</div>
|
||||
|
||||
<div class="article_teaser">
|
||||
<span>${article.location} ${article.date}</span> - ${article.teaser}
|
||||
</div>
|
||||
|
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:java="http://xml.apache.org/xslt/java"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</td>
|
||||
<td align="right" valign="top">
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/content/article/<xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.pdf')"/></xsl:attribute>
|
||||
<img src="/views/common/images/icons/pdficon_small.gif"/>
|
||||
</xsl:element>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
120
source/test-resources/xforms/examples/article/article-pdf.xsl
Normal file
120
source/test-resources/xforms/examples/article/article-pdf.xsl
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
|
||||
<xsl:output method="xml"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<fo:root>
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="only">
|
||||
<fo:region-body
|
||||
region-name="xsl-region-body"
|
||||
margin="0.7in"/>
|
||||
<fo:region-before
|
||||
region-name="xsl-region-before"
|
||||
extent="0.7in"
|
||||
display-align="before" />
|
||||
|
||||
<fo:region-after
|
||||
region-name="xsl-region-after"
|
||||
display-align="after"
|
||||
extent="0.7in" />
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
|
||||
<fo:page-sequence master-reference="only">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:block
|
||||
font-family="Times"
|
||||
font-size="18pt"
|
||||
font-weight="bold"
|
||||
space-before="18pt"
|
||||
space-after="12pt"
|
||||
text-align="left">
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</fo:block>
|
||||
|
||||
<fo:table text-align="justify">
|
||||
<fo:table-column column-width="1.3in"/>
|
||||
<fo:table-column column-width="1.3in" number-columns-repeated="4"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<xsl:element name="fo:table-cell">
|
||||
<xsl:attribute name="padding">
|
||||
<xsl:value-of select="'6pt'"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="number-columns-spanned">
|
||||
<xsl:value-of select="'5'"/>
|
||||
</xsl:attribute>
|
||||
<fo:block
|
||||
font-family="Times"
|
||||
font-size="12pt"
|
||||
space-before="18pt"
|
||||
space-after="12pt">
|
||||
<xsl:value-of select="normalize-space(/article:article/article:teaser)" disable-output-escaping="yes"/>
|
||||
</fo:block>
|
||||
</xsl:element>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="/article:article/article:page">
|
||||
<xsl:variable name="page_number" select="1+count(preceding-sibling::*[name()=name(current())])"/>
|
||||
<fo:table-row>
|
||||
<xsl:element name="fo:table-cell">
|
||||
<xsl:attribute name="padding">
|
||||
<xsl:value-of select="'6pt'"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="number-columns-spanned">
|
||||
<xsl:value-of select="'5'"/>
|
||||
</xsl:attribute>
|
||||
<fo:block
|
||||
font-family="Times"
|
||||
font-size="12pt"
|
||||
space-before="18pt"
|
||||
space-after="12pt">
|
||||
<xsl:if test="position()=1">
|
||||
<fo:inline font-weight="bold">
|
||||
<xsl:value-of select="normalize-space(/article:article/article:location)" disable-output-escaping="yes"/>—
|
||||
</fo:inline>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="normalize-space(.)" disable-output-escaping="yes"/>
|
||||
</fo:block>
|
||||
</xsl:element>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
467
source/test-resources/xforms/examples/article/article.xsd
Normal file
467
source/test-resources/xforms/examples/article/article.xsd
Normal file
@@ -0,0 +1,467 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- Imports -->
|
||||
<xs:include schemaLocation="webscript://demo/wcm/schema/content/list?ticket=${ticket}%26storeid=${storeid}%26form=user_profile%26method=xpath" />
|
||||
|
||||
<!--
|
||||
<xs:simpleType name="content-list">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="/Yong_Qu.xml">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:label>Yong_Qu</alf:label>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
-->
|
||||
<!-- defines name prefix-->
|
||||
<xs:simpleType name="name-prefix">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="Mr"/>
|
||||
<xs:enumeration value="Mrs"/>
|
||||
<xs:enumeration value="Ms"/>
|
||||
<xs:enumeration value="Miss"/>
|
||||
<xs:enumeration value="Dr"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- defines state list-->
|
||||
<xs:simpleType name="us-state">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="AL">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Alabama</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="AK">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Alaska</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="AZ">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Arizona</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="AR">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Arkansas</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="CA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>California</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="CO">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Colorado</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="CT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Connecticut</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DC">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>District of Columbia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DE">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Delaware</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="FL">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Florida</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="GA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Georgia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="HI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Hawaii</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ID">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Idaho</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="IL">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Illinois</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="IN">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Indiana</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="IA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Iowa</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="KS">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Kansas</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="KY">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Kentucky</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="LA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Louisiana</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ME">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Maine</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Maryland</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Massachusetts</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Michigan</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MN">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Minnesota</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MS">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Mississippi</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MO">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Missouri</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Montana</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NE">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Nebraska</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NV">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Nevada</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NH">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New Hampshire</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NJ">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New Jersey</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NM">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New Mexico</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NY">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New York</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NC">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>North Carolina</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ND">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>North Dakota</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="OH">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Ohio</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="OK">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Oklahoma</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="OR">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Oregon</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="PA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Pennsylvania</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Rhode Island</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SC">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>South Carolina</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SD">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>South Dakota</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="TN">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Tennessee</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="TX">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Texas</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="UT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Utah</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="VT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Vermont</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="VA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Virginia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Washington</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WV">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>West Virginia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Wisconsin</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WY">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Wyoming</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- defines the form for creating a user profile -->
|
||||
<xs:complexType name="user-profile">
|
||||
<xs:sequence>
|
||||
<xs:element name="name">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>default</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="prefix" type="article:name-prefix"/>
|
||||
<xs:element name="first" type="xs:normalizedString"/>
|
||||
<xs:element name="last" type="xs:normalizedString"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="address" minOccurs="0"
|
||||
maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="street" type="xs:normalizedString" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="city" type="xs:normalizedString"/>
|
||||
<xs:element name="state" type="article:us-state"/>
|
||||
<xs:element name="zip">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:alert>The value entered is not a valid zip code.</alf:alert>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:maxLength value="5"/>
|
||||
<xs:pattern value="[0-9][0-9][0-9][0-9][0-9]"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="picture" type="xs:anyURI" minOccurs="0" maxOccurs="1" default="/content/user_profile/pictures"/>
|
||||
<xs:element name="bio" type="xs:string"/>
|
||||
<xs:element name="email" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:alert>The value entered is not a valid email address.</alf:alert>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:maxLength value="256"/>
|
||||
<xs:pattern value="[A-Za-z0-9._]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,4}"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="popularity" minOccurs="0" maxOccurs="1" default="3">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="2"/>
|
||||
<xs:fractionDigits value="1"/>
|
||||
<xs:minInclusive value="0.0"/>
|
||||
<xs:maxInclusive value="5.0"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="article-picture">
|
||||
<xs:sequence>
|
||||
<xs:element name="image" type="xs:anyURI" minOccurs="0" maxOccurs="1" default="/content/article/photos">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>image_file_picker</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="caption" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="article-page">
|
||||
<xs:sequence>
|
||||
<xs:element name="page_title" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="page_body" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>full</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="page_picture" type="article:article-picture" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="related-item">
|
||||
<xs:sequence>
|
||||
<xs:element name="item_label" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="item_link" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>search_restricted_file_picker</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- defines the form for creating a user_profile -->
|
||||
<xs:element name="user_profile" type="article:user-profile" />
|
||||
|
||||
<!-- defines the form for creating a news flash -->
|
||||
<xs:element name="news_flash">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="location" type="xs:normalizedString"/>
|
||||
<xs:element name="date" type="xs:date" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="body" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>full</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- defines the form for creating a full article -->
|
||||
<xs:element name="article">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="author" type="article:content-list" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="location" type="xs:normalizedString"/>
|
||||
<xs:element name="date" type="xs:date" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="teaser" type="xs:string"/>
|
||||
<xs:element name="tag" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="page" type="article:article-page" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="related" type="article:related-item" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="include_legal_text" type="xs:boolean" default="false"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
136
source/test-resources/xforms/examples/article/article.xsl
Normal file
136
source/test-resources/xforms/examples/article/article.xsl
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</title>
|
||||
<meta name="description" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<h1>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</h1>
|
||||
</td>
|
||||
<td align="right" valign="top">
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/content/article/<xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.pdf')"/></xsl:attribute>
|
||||
<img src="/views/common/images/icons/pdficon_small.gif"/>
|
||||
</xsl:element>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<i>
|
||||
<xsl:value-of select="/article:article/article:author" disable-output-escaping="yes"/>,<xsl:value-of select="/article:article/article:launch_date"/>
|
||||
</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p>
|
||||
<xsl:if test="/article:article/article:photo[article:page_number='0']">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/article:article/article:photo[article:page_number='0']/article:image"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="align">
|
||||
<xsl:text>left</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="normalize-space(/article:article/article:teaser)" disable-output-escaping="yes"/>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" colspan="2">
|
||||
<xsl:for-each select="/article:article/article:body">
|
||||
<xsl:variable name="page_number" select="1+count(preceding-sibling::*[name()=name(current())])"/>
|
||||
<p>
|
||||
<xsl:if test="/article:article/article:photo[article:page_number=$page_number]">
|
||||
<xsl:element name="table">
|
||||
<xsl:attribute name="align">
|
||||
<xsl:if test="$page_number mod 2 = 0">
|
||||
<xsl:text>left</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$page_number mod 2 = 1">
|
||||
<xsl:text>right</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/article:article/article:photo[article:page_number=$page_number]/article:image"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='200' align="center">
|
||||
<h6><xsl:value-of select="/article:article/article:photo[article:page_number=$page_number]/article:caption" disable-output-escaping="yes"/></h6>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<xsl:if test="position()=1">
|
||||
<b>
|
||||
<xsl:value-of select="normalize-space(/article:article/article:location)" disable-output-escaping="yes"/>
|
||||
</b>
|
||||
—
|
||||
</xsl:if>
|
||||
<xsl:value-of select="normalize-space(.)" disable-output-escaping="yes"/>
|
||||
</p>
|
||||
</xsl:for-each>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,44 @@
|
||||
<#ftl ns_prefixes={"D":"http://www.alfresco.org/alfresco/article","xsi":"http://www.w3.org/2001/XMLSchema-instance"}>
|
||||
<style>
|
||||
.article_details {
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
font-family: helvetica;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.article_title{
|
||||
padding: 8px;
|
||||
font-size: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.article_author {
|
||||
background: #fff;
|
||||
border: 1px solid #e2e1e1;
|
||||
position: relative;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
|
||||
.article_teaser {
|
||||
clear: left;
|
||||
margin: 10px 0 10px 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="article_details">
|
||||
|
||||
<div class="article_title">
|
||||
${news_flash.title}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="article_teaser">
|
||||
<span>${news_flash.location} ${news_flash.date}</span> - ${news_flash.body}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -0,0 +1,36 @@
|
||||
<#ftl ns_prefixes={"D":"http://www.alfresco.org/alfresco/article","xsi":"http://www.w3.org/2001/XMLSchema-instance","alf":"http://www.alfresco.org"}>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<#if user_profile[0]??>
|
||||
<#if user_profile.picture[0]??>
|
||||
<td>
|
||||
<img src="${alf.avm_sandbox_url}${user_profile.picture}" width="100"/>
|
||||
</td>
|
||||
</#if>
|
||||
<td>
|
||||
<div>
|
||||
${user_profile.name.prefix}. ${user_profile.name.first} ${user_profile.name.last}
|
||||
</div>
|
||||
<div>
|
||||
${user_profile.bio}
|
||||
</div>
|
||||
<div>
|
||||
<#if user_profile.address[0]??>
|
||||
<b>Address: </b>
|
||||
<#list user_profile.address.street as street>
|
||||
${street}
|
||||
</#list>
|
||||
${user_profile.address.city}, ${user_profile.address.state} ${user_profile.address.zip}
|
||||
</#if>
|
||||
</div>
|
||||
<div>
|
||||
<#if user_profile.email[0]??>
|
||||
<b>Email: </b>${user_profile.email}
|
||||
</#if>
|
||||
</div>
|
||||
</td>
|
||||
</#if>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -0,0 +1,50 @@
|
||||
<#ftl ns_prefixes={"D":"http://www.alfresco.org/alfresco/article","xsi":"http://www.w3.org/2001/XMLSchema-instance"}>
|
||||
<style>
|
||||
|
||||
.user_profile {
|
||||
background: #fff;
|
||||
border: 1px solid #e2e1e1;
|
||||
position: relative;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.user_profile_picture {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 80px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.user_profile_name {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="user_profile">
|
||||
<#if user_profile[0]??>
|
||||
<#if user_profile.picture[0]??>
|
||||
<img src="${user_profile.picture}" class="user_profile_picture"/>
|
||||
</#if>
|
||||
<div class="user_profile_name">
|
||||
${user_profile.name.prefix}. ${user_profile.name.first} ${user_profile.name.last}
|
||||
</div>
|
||||
<div>
|
||||
${user_profile.bio}
|
||||
</div>
|
||||
<div>
|
||||
<#if user_profile.address[0]??>
|
||||
<b>Address: </b>
|
||||
<#list user_profile.address.street as street>
|
||||
${street}
|
||||
</#list>
|
||||
${user_profile.address.city}, ${user_profile.address.state} ${user_profile.address.zip}
|
||||
</#if>
|
||||
</div>
|
||||
<div>
|
||||
<#if user_profile.email[0]??>
|
||||
<b>Email: </b>${user_profile.email}
|
||||
</#if>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<webscript>
|
||||
<shortname>WCM Schema for Category Selection</shortname>
|
||||
<description>Generate part of schema for category selection</description>
|
||||
<url format="html" template="/demo/wcm/schema/catgory"/>
|
||||
<format default="html">extension</format>
|
||||
<authentication>user</authentication>
|
||||
<transaction>required</transaction>
|
||||
</webscript>
|
@@ -0,0 +1,23 @@
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
elementFormDefault="qualified">
|
||||
<xs:simpleType name="catgory-list">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Pressrelease">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alfresco:label>Press Release</alfresco:label>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="Whitepaper">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alfresco:label>Whitepaper</alfresco:label>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<webscript>
|
||||
<shortname>WCM Schema for Content Selection</shortname>
|
||||
<description>Generate part of schema for content selection</description>
|
||||
<url format="xml" template="/demo/wcm/schema/content/list"/>
|
||||
<format default="xml">extension</format>
|
||||
<authentication>user</authentication>
|
||||
<transaction>required</transaction>
|
||||
</webscript>
|
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<#if results??>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
<xs:simpleType name="content-list">
|
||||
<xs:restriction base="xs:string">
|
||||
<#list results as result>
|
||||
<#if ! result.hasAspect("{http://www.alfresco.org/model/wcmappmodel/1.0}rendition")>
|
||||
<xs:enumeration value="${result.displayPath?substring(result.displayPath?index_of("/www/avm_webapps/ROOT")+21)}/${result.name}">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:label>${result.name?substring(0,result.name?index_of(".xml"))}</alf:label>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</#if>
|
||||
</#list>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
</#if>
|
||||
|
@@ -0,0 +1,70 @@
|
||||
var contentList = null;
|
||||
|
||||
if (args["storeid"] == null) {
|
||||
|
||||
logger.log("ERROR: 'store' argument not specified.");
|
||||
|
||||
} else {
|
||||
|
||||
// Get the store id
|
||||
var storeId = args["storeid"];
|
||||
|
||||
var store = avm.lookupStore(storeId);
|
||||
|
||||
if ( store != null ) {
|
||||
|
||||
// Get the form name
|
||||
var formName = args["form"];
|
||||
|
||||
if ( formName != null ) {
|
||||
|
||||
|
||||
var method = (args.method == null) ? "lucene" : args.method;
|
||||
|
||||
if ( method == "lucene" ) {
|
||||
|
||||
// Run the lucene query
|
||||
var results = store.luceneSearch('@\\{http\\://www.alfresco.org/model/wcmappmodel/1.0\\}parentformname:"'+formName+'"');
|
||||
|
||||
contentList = results;
|
||||
|
||||
} else {
|
||||
|
||||
var path = (args.path == null) ? "/ROOT" : args.path;
|
||||
|
||||
var storeRootNode = avm.lookupStoreRoot(storeId);
|
||||
|
||||
// try xpath???
|
||||
|
||||
var results = avm.lookupNode(storeRootNode.path + path);
|
||||
|
||||
var contentList = new Array();
|
||||
|
||||
if ( results.children != null ) {
|
||||
|
||||
for ( var i = 0 ; i < results.children.length ; i ++ ) {
|
||||
|
||||
var item = results.children[i];
|
||||
|
||||
if ( item.properties["{http://www.alfresco.org/model/wcmappmodel/1.0}parentformname"] == formName ) {
|
||||
|
||||
contentList.push(item);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
model.results= contentList;
|
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<#if results??>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
<xs:simpleType name="content-list">
|
||||
<xs:restriction base="xs:string">
|
||||
<#list results as result>
|
||||
<#if ! result.hasAspect("{http://www.alfresco.org/model/wcmappmodel/1.0}rendition")>
|
||||
<xs:enumeration value="${result.displayPath?substring(result.displayPath?index_of("/www/avm_webapps/ROOT")+21)}/${result.name}">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:label>${result.name?substring(0,result.name?index_of(".xml"))}</alf:label>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</#if>
|
||||
</#list>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
</#if>
|
||||
|
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
Describes a press release and related assets.
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:pr="http://www.alfresco.org/alfresco/pr"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/pr"
|
||||
elementFormDefault="qualified">
|
||||
<!-- defines the form for creating a company footer -->
|
||||
<xs:element name="company_footer">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString"/>
|
||||
<xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -1,19 +1,27 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
Licensed under the Mozilla Public License version 1.1
|
||||
with a permitted attribution clause. You may obtain a
|
||||
copy of the License at
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
http://www.alfresco.org/legal/license.txt
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
either express or implied. See the License for the specific
|
||||
language governing permissions and limitations under the
|
||||
License.
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
Describes a press release and related assets.
|
||||
-->
|
@@ -1,19 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
Licensed under the Mozilla Public License version 1.1
|
||||
with a permitted attribution clause. You may obtain a
|
||||
copy of the License at
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
http://www.alfresco.org/legal/license.txt
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
either express or implied. See the License for the specific
|
||||
language governing permissions and limitations under the
|
||||
License.
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
|
||||
Produces an html rendition of a press release
|
@@ -0,0 +1,36 @@
|
||||
[#ftl ns_prefixes={"D", "http://www.alfresco.org/alfresco/press-release"}]
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
${PressRelease.Title}
|
||||
</title>
|
||||
[#if PressRelease.Summary?exists]
|
||||
<meta name="description" content="${PressRelease.Summary}">
|
||||
[/#if]
|
||||
[#if PressRelease.Keyword?exists]
|
||||
[#if PressRelease.Keyword?size > 0]
|
||||
[#assign keywordString = ""]
|
||||
[#list PressRelease.Keyword as Keyword]
|
||||
[#assign keywordString = keywordString + "," + Keyword]
|
||||
[/#list]
|
||||
<meta name="keywords" content="${keywordString}">
|
||||
[/#if]
|
||||
[/#if]
|
||||
</head>
|
||||
<body>
|
||||
<h1>${PressRelease.Title}</h1>
|
||||
<p>${PressRelease.Body}</p>
|
||||
[#if PressRelease.Image?exists]
|
||||
<img src="${PressRelease.Image}">
|
||||
[/#if]
|
||||
|
||||
<!-- TEST -->
|
||||
<hr>
|
||||
[#list avm.stores as store]
|
||||
${store.name}<br>
|
||||
[/#list]
|
||||
<hr>
|
||||
<!-- TEST END -->
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:pr="http://www.alfresco.org/alfresco/press-release"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
exclude-result-prefixes="xhtml">
|
||||
|
||||
<xsl:output method="html"
|
||||
encoding="UTF-8"
|
||||
indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
|
||||
|
||||
<xsl:preserve-space elements="*" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="/pr:PressRelease/pr:Title" disable-output-escaping="yes" />
|
||||
</title>
|
||||
<xsl:if test="/pr:PressRelease/pr:Summary">
|
||||
<meta name="description" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/pr:PressRelease/pr:Summary" />
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
<xsl:if test="/pr:PressRelease/pr:Keyword">
|
||||
<meta name="keyword" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:for-each select="/pr:PressRelease/pr:Keyword">
|
||||
<xsl:value-of select="normalize-space(.)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() != last()">,</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
</head>
|
||||
<body>
|
||||
<h1><xsl:value-of select="/pr:PressRelease/pr:Title" disable-output-escaping="yes" /></h1>
|
||||
<p><xsl:value-of select="/pr:PressRelease/pr:Body" disable-output-escaping="yes" /></p>
|
||||
<xsl:if test="/pr:PressRelease/pr:Image">
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/pr:PressRelease/pr:Image" disable-output-escaping="yes" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</xsl:if>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:pr="http://www.alfresco.org/alfresco/press-release"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
exclude-result-prefixes="xhtml">
|
||||
|
||||
<xsl:output method="html"
|
||||
encoding="UTF-8"
|
||||
indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
|
||||
|
||||
<xsl:preserve-space elements="*" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head />
|
||||
<body>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="/pr:PressRelease/pr:Title" disable-output-escaping="yes" />.html
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="/pr:PressRelease/pr:Title" disable-output-escaping="yes" />
|
||||
</a>
|
||||
<xsl:if test="/pr:PressRelease/pr:Summary">
|
||||
<p><xsl:value-of select="/pr:PressRelease/pr:Summary" disable-output-escaping="yes" /></p>
|
||||
</xsl:if>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:pr="http://www.alfresco.org/alfresco/press-release"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/press-release"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- Complex Types -->
|
||||
<xs:complexType name="PressReleaseType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Title" type="xs:normalizedString" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Summary" type="xs:normalizedString" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Keyword" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="PublishDate" type="xs:date" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="ExpiryDate" type="xs:date" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Body" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Image" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
<!-- Root Element -->
|
||||
<xs:element name="PressRelease" type="pr:PressReleaseType" />
|
||||
|
||||
</xs:schema>
|
79
source/test-resources/xforms/examples/product/product.xsd
Normal file
79
source/test-resources/xforms/examples/product/product.xsd
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:pr="http://www.alfresco.org/alfresco/product"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/product"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- Simple types -->
|
||||
<xs:simpleType name="NonEmptyNormalizedStringType">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:minLength value="1" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="SKUType">
|
||||
<xs:restriction base="pr:NonEmptyNormalizedStringType">
|
||||
<xs:maxLength value="32" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- Complex types -->
|
||||
<xs:complexType abstract="true" name="CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Title" type="pr:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Summary" type="pr:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Keyword" type="pr:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="PublishDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="ExpiryDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="ProductType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="pr:CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="SKU" type="pr:SKUType" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Body" type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="SmallThumbnail" type="xs:anyURI" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="LargeThumbnail" type="xs:anyURI" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Image" type="xs:anyURI" nillable="false" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
<!-- Root Element -->
|
||||
<xs:element name="Product" type="pr:ProductType">
|
||||
<xs:unique name="UniqueKeyword">
|
||||
<xs:selector xpath="pr:Keyword" />
|
||||
<xs:field xpath="." />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
108
source/test-resources/xforms/examples/product/product.xslt
Normal file
108
source/test-resources/xforms/examples/product/product.xslt
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:pr="http://www.alfresco.org/alfresco/product"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
exclude-result-prefixes="xhtml">
|
||||
|
||||
<xsl:output method="html"
|
||||
encoding="UTF-8"
|
||||
indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
|
||||
|
||||
<xsl:preserve-space elements="*" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="/pr:Product/pr:Title" disable-output-escaping="yes" />
|
||||
(<xsl:value-of select="/pr:Product/pr:SKU" disable-output-escaping="yes" />)
|
||||
</title>
|
||||
<xsl:if test="/pr:Product/pr:Summary">
|
||||
<meta name="description" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/pr:Product/pr:Summary" />
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
<xsl:if test="/pr:Product/pr:Keyword">
|
||||
<meta name="keyword" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:for-each select="/pr:Product/pr:Keyword">
|
||||
<xsl:value-of select="normalize-space(.)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() != last()">,</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
<xsl:value-of select="/pr:Product/pr:Title" disable-output-escaping="yes" />
|
||||
(<xsl:value-of select="/pr:Product/pr:SKU" disable-output-escaping="yes" />)
|
||||
</h1>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="/pr:Product/pr:LargeThumbnail">
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/pr:Product/pr:LargeThumbnail" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</xsl:when>
|
||||
<xsl:when test="/pr:Product/pr:LargeThumbnail">
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/pr:Product/pr:LargeThumbnail" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<p><xsl:value-of select="/pr:Product/pr:Body" disable-output-escaping="yes" /></p>
|
||||
|
||||
<xsl:if test="/pr:Product/pr:Image">
|
||||
<h2>Other product images:</h2>
|
||||
<xsl:for-each select="/pr:Product/pr:Image">
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="." />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
<br/>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
BIN
source/test-resources/xforms/examples/wcm-form-samples-forms.acp
Normal file
BIN
source/test-resources/xforms/examples/wcm-form-samples-forms.acp
Normal file
Binary file not shown.
BIN
source/test-resources/xforms/examples/wcm-form-samples.amp
Normal file
BIN
source/test-resources/xforms/examples/wcm-form-samples.amp
Normal file
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- See http://wiki.alfresco.com/wiki/Web_Scripts_Framework#Adding_new_Formats -->
|
||||
<bean parent="webscripts.formatmap">
|
||||
<property name="formats">
|
||||
<props>
|
||||
<prop key="xsd">text/xml</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
xmlns:wsiex="http://www.alfresco.org/alfresco/webscriptimportexample"
|
||||
xmlns:wsimp="http://www.alfresco.org/alfresco/webscriptimported"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/webscriptimportexample"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- Imports -->
|
||||
<xs:import namespace="http://www.alfresco.org/alfresco/webscriptimported" schemaLocation="webscript://pmonks/webformimport.xsd?storeid=${storeid}" />
|
||||
|
||||
|
||||
<!-- Root Element -->
|
||||
<xs:element name="WebScriptImportExample" type="wsimp:WebScriptImportExampleType">
|
||||
<xs:unique name="UniqueKeyword">
|
||||
<xs:selector xpath="wsimp:Keyword" />
|
||||
<xs:field xpath="." />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
@@ -0,0 +1,7 @@
|
||||
<webscript>
|
||||
<shortname>Web Form Import Example</shortname>
|
||||
<description>Example for testing import of a Web Script from a Web Form</description>
|
||||
<url>/pmonks/webformimport?storeid={storeid}</url>
|
||||
<format default="xsd">any</format>
|
||||
<authentication>user</authentication> <!-- This should be "user", but currently web script imports don't pass through user credentials -->
|
||||
</webscript>
|
@@ -0,0 +1,14 @@
|
||||
// Parse arguments
|
||||
var storeid = args.storeid;
|
||||
|
||||
// Validate arguments
|
||||
if (storeid == undefined || storeid == "")
|
||||
{
|
||||
status.code = 400;
|
||||
status.message = "Mandatory query string parameter 'storeid' was not provided.";
|
||||
status.redirect = true;
|
||||
}
|
||||
|
||||
// Generate an id (in a truly terrible way, but it's just an example!)
|
||||
model.storeid = storeid;
|
||||
model.idValue = Math.floor(Math.random() * 1000);
|
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
xmlns:wsimp="http://www.alfresco.org/alfresco/webscriptimported"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/webscriptimported"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:simpleType name="NonEmptyNormalizedStringType">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="WebScriptImportExampleType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Id" type="xs:nonNegativeInteger" nillable="false" minOccurs="1" maxOccurs="1" fixed="${idValue}" />
|
||||
<xs:element name="StoreId" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" fixed="${storeid}" />
|
||||
<xs:element name="Title" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Summary" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Keyword" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="Body" type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
Binary file not shown.
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:java="http://xml.apache.org/xslt/java"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:text disable-output-escaping="yes"><%String channel = (String) request.getParameter("channel");%></xsl:text>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</title>
|
||||
<meta name="description" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<b>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/views/pages/details.jsp?channel=<%=channel%>&content=/content/article/<xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.html')"/>&title=<xsl:value-of select="java:java.net.URLEncoder.encode(/article:article/article:title,'UTF-8')" disable-output-escaping="yes"/></xsl:attribute>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</xsl:element>
|
||||
</b>
|
||||
<br/>
|
||||
<i>
|
||||
<xsl:value-of select="/article:article/article:author" disable-output-escaping="yes"/>,<xsl:value-of select="/article:article/article:launch_date"/>
|
||||
</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<xsl:if test="/article:article/article:photo[article:page_number='0']">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/article:article/article:photo[article:page_number='0']/article:image"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="align">
|
||||
<xsl:text>left</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="normalize-space(/article:article/article:teaser)" disable-output-escaping="yes"/>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:java="http://xml.apache.org/xslt/java"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:text disable-output-escaping="yes"><%String channel = (String) request.getParameter("channel");%></xsl:text>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/views/pages/details.jsp?channel=<%=channel%>&content=/content/article/<xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.html')"/>&title=<xsl:value-of select="java:java.net.URLEncoder.encode(/article:article/article:title,'UTF-8')" disable-output-escaping="yes"/></xsl:attribute>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</xsl:element>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:java="http://xml.apache.org/xslt/java"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml fn java article xsl">
|
||||
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<item>
|
||||
<title><xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/></title>
|
||||
<link>/views/pages/details.jsp?content=/content/article/<xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.html')"/>&title=<xsl:value-of select="java:java.net.URLEncoder.encode(/article:article/article:title,'UTF-8')" disable-output-escaping="yes"/></link>
|
||||
<description><xsl:value-of select="normalize-space(/article:article/article:teaser)"/></description>
|
||||
<pubDate>2000-01-01T12:00:00.000-00:00</pubDate>
|
||||
</item>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/article"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- defines the form for creating a press release -->
|
||||
<xs:element name="article">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="author" type="xs:normalizedString" />
|
||||
<xs:element name="location" type="xs:normalizedString"/>
|
||||
<xs:element name="teaser" type="xs:string"/>
|
||||
<xs:element name="keywords" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
|
||||
<xs:element name="photo" minOccurs="0"
|
||||
maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="image" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="caption" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="page_number" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="launch_date" type="xs:date"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</title>
|
||||
<meta name="description" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h1>
|
||||
<xsl:value-of select="/article:article/article:title" disable-output-escaping="yes"/>
|
||||
</h1>
|
||||
<br/>
|
||||
<i>
|
||||
<xsl:value-of select="/article:article/article:author" disable-output-escaping="yes"/>,<xsl:value-of select="/article:article/article:launch_date"/>
|
||||
</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<xsl:if test="/article:article/article:photo[article:page_number='0']">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/article:article/article:photo[article:page_number='0']/article:image"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="align">
|
||||
<xsl:text>left</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="normalize-space(/article:article/article:teaser)" disable-output-escaping="yes"/>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<xsl:for-each select="/article:article/article:body">
|
||||
<xsl:variable name="page_number" select="1+count(preceding-sibling::*[name()=name(current())])"/>
|
||||
<p>
|
||||
<xsl:if test="/article:article/article:photo[article:page_number=$page_number]">
|
||||
<xsl:element name="table">
|
||||
<xsl:attribute name="align">
|
||||
<xsl:if test="$page_number mod 2 = 1">
|
||||
<xsl:text>left</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$page_number mod 2 = 0">
|
||||
<xsl:text>right</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/article:article/article:photo[article:page_number=$page_number]/article:image"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='200'>
|
||||
<h6><xsl:value-of select="/article:article/article:photo[article:page_number=$page_number]/article:caption" disable-output-escaping="yes"/></h6>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<xsl:if test="position()=1">
|
||||
<b>
|
||||
<xsl:value-of select="normalize-space(/article:article/article:location)" disable-output-escaping="yes"/>
|
||||
</b>
|
||||
—
|
||||
</xsl:if>
|
||||
<xsl:value-of select="normalize-space(.)" disable-output-escaping="yes"/>
|
||||
</p>
|
||||
</xsl:for-each>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:motd="http://www.alfresco.org/alfresco/motd"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/motd"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- dynamically loads the company footer choices simple type -->
|
||||
<xs:include schemaLocation="/views/components/channel-list.jsp"/>
|
||||
|
||||
<!-- defines the form for creating a press release -->
|
||||
<xs:element name="motd">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="document" type="xs:string"/>
|
||||
<xs:element name="channel" type="motd:channel_choices"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:motd="http://www.alfresco.org/alfresco/motd"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<div class="motd">
|
||||
<xsl:value-of select="/motd:motd/motd:document" disable-output-escaping="yes"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:mm="http://www.alfresco.org/alfresco/mm"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml mm fn">
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:variable name="urlPrefix" select="string($alf:avm_sandbox_url)"/>
|
||||
<track>
|
||||
<title><xsl:value-of select="/mm:multi-media/mm:title"/></title>
|
||||
<creator><xsl:value-of select="/mm:multi-media/mm:author"/></creator>
|
||||
<location><xsl:value-of select="$urlPrefix"/><xsl:value-of select="/mm:multi-media/mm:file"/></location>
|
||||
</track>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:mm="http://www.alfresco.org/alfresco/mm"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/mm"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- defines the form for creating a press release -->
|
||||
<xs:element name="multi-media">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="author" type="xs:normalizedString" />
|
||||
<xs:element name="description" type="xs:anyType"/>
|
||||
<xs:element name="file" type="xs:anyURI"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
xmlns:nav="http://www.alfresco.org/alfresco/navigation" exclude-result-prefixes="nav fn" version="1.0">
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/nav:navigation">
|
||||
<div id="nav-menu" class="yuimenubar">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<xsl:for-each select="nav:main_channel">
|
||||
<xsl:variable name="main_channel" select="nav:name"/>
|
||||
<xsl:element name="li">
|
||||
<xsl:if test="position()=1">
|
||||
<xsl:attribute name="class">yuimenubaritem first-of-type</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="position()!=1">
|
||||
<xsl:attribute name="class">yuimenubaritem</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/views/pages/main-channel.jsp?channel=/<xsl:value-of select="$main_channel"/></xsl:attribute>
|
||||
<xsl:value-of select="$main_channel"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="div">
|
||||
<xsl:attribute name="id"><xsl:value-of select="$main_channel"/></xsl:attribute>
|
||||
<xsl:attribute name="class">yuimenu</xsl:attribute>
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<xsl:for-each select="nav:sub_channel">
|
||||
<li class="yuimenuitem">
|
||||
<xsl:variable name="sub_channel" select="nav:name"/>
|
||||
<xsl:variable name="sub_channel_path" select="concat('/',$main_channel,'/',$sub_channel)"/>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/views/pages/sub-channel.jsp?channel=<xsl:value-of select="$sub_channel_path"/></xsl:attribute>
|
||||
<xsl:value-of select="$sub_channel"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="div">
|
||||
<xsl:attribute name="id"><xsl:value-of select="$sub_channel"/></xsl:attribute>
|
||||
<xsl:attribute name="class">yuimenu</xsl:attribute>
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<xsl:for-each select="nav:sub_sub_channel">
|
||||
<xsl:variable name="sub_sub_channel" select="nav:name"/>
|
||||
<xsl:variable name="sub_sub_channel_path" select="concat('/',$main_channel,'/',$sub_channel,'/',$sub_sub_channel)"/>
|
||||
<li>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/views/pages/sub-sub-channel.jsp?channel=<xsl:value-of select="$sub_sub_channel_path"/></xsl:attribute>
|
||||
<xsl:value-of select="$sub_sub_channel"/>
|
||||
</xsl:element>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:element>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
<li class="yuimenubaritem"><a href="/views/pages/my-tools.jsp">My Tools</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
xmlns:nav="http://www.alfresco.org/alfresco/navigation" version="1.0">
|
||||
<xsl:output method="xml" />
|
||||
<xsl:template match="/nav:navigation">
|
||||
<xsl:variable name="urlPrefix" select="string($alf:avm_sandbox_url)"/>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/index.jsp
|
||||
</loc>
|
||||
</url>
|
||||
<xsl:for-each select="nav:main_channel">
|
||||
<xsl:variable name="main_channel" select="nav:name"/>
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/main-channel.jsp?channel=/<xsl:value-of select="$main_channel"/>
|
||||
</loc>
|
||||
</url>
|
||||
<xsl:for-each select="nav:content_link">
|
||||
<xsl:variable name="content_link" select="nav:path"/>
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/details.jsp?channel=/<xsl:value-of select="$main_channel"/>&content=<xsl:value-of select="$content_link"/>
|
||||
</loc>
|
||||
</url>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="nav:sub_channel">
|
||||
<xsl:variable name="sub_channel" select="nav:name"/>
|
||||
<xsl:variable name="sub_channel_path" select="concat('/',$main_channel,'/',$sub_channel)"/>
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/sub-channel.jsp?channel=<xsl:value-of select="$sub_channel_path"/>
|
||||
</loc>
|
||||
</url>
|
||||
<xsl:for-each select="nav:content_link">
|
||||
<xsl:variable name="content_link" select="nav:path"/>
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/details.jsp?channel=<xsl:value-of select="$sub_channel_path"/>&content=<xsl:value-of select="$content_link"/>
|
||||
</loc>
|
||||
</url>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="nav:sub_sub_channel">
|
||||
<xsl:variable name="sub_sub_channel" select="nav:name"/>
|
||||
<xsl:variable name="sub_sub_channel_path" select="concat($sub_channel_path,'/',$sub_sub_channel)"/>
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/sub-sub-channel.jsp?channel=<xsl:value-of select="$sub_sub_channel_path"/>
|
||||
</loc>
|
||||
</url>
|
||||
<xsl:for-each select="nav:content_link">
|
||||
<xsl:variable name="content_link" select="nav:path"/>
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/details.jsp?channel=<xsl:value-of select="$sub_sub_channel_path"/>&content=<xsl:value-of select="$content_link"/>
|
||||
</loc>
|
||||
</url>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="nav:content_link">
|
||||
<xsl:variable name="content_link" select="nav:path"/>
|
||||
<url>
|
||||
<loc>
|
||||
<xsl:value-of select="$urlPrefix"/>/views/pages/details.jsp?channel=/&content=<xsl:value-of select="$content_link"/>
|
||||
</loc>
|
||||
</url>
|
||||
</xsl:for-each>
|
||||
</urlset>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:nav="http://www.alfresco.org/alfresco/navigation"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/navigation"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- defines type for content link type -->
|
||||
<xs:simpleType name="category">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="Normal"/>
|
||||
<xs:enumeration value="Feature"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- defines type for content link -->
|
||||
<xs:complexType name="link">
|
||||
<xs:sequence>
|
||||
<xs:element name="path" type="xs:anyURI" />
|
||||
<xs:element name="type" type="nav:category" default="Normal"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- defines type for third level channel -->
|
||||
<xs:complexType name="channel">
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString" />
|
||||
<xs:element name="description" type="xs:normalizedString"/>
|
||||
<xs:element name="content_link" type="nav:link" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- defines type for second level channel -->
|
||||
<xs:complexType name="sub_channel">
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString" />
|
||||
<xs:element name="description" type="xs:normalizedString"/>
|
||||
<xs:element name="sub_sub_channel" type="nav:channel" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="content_link" type="nav:link" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- defines type for first level channel -->
|
||||
<xs:complexType name="main_channel">
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString" />
|
||||
<xs:element name="description" type="xs:normalizedString"/>
|
||||
<xs:element name="sub_channel" type="nav:sub_channel" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="content_link" type="nav:link" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- defines the form for creating a navigation hierarchy -->
|
||||
<xs:element name="navigation">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString" />
|
||||
<xs:element name="description" type="xs:normalizedString"/>
|
||||
<xs:element name="main_channel" type="nav:main_channel" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="content_link" type="nav:link" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:nf="http://www.alfresco.org/alfresco/nf"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:text disable-output-escaping="yes"><%String channel = (String) request.getParameter("channel");%></xsl:text>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/views/pages/details.jsp?channel=<%=channel%>&amp;content=/content/news-flash/<xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.html')"/>&amp;title=<xsl:value-of select="/nf:news_flash/nf:title"/></xsl:attribute>
|
||||
<xsl:value-of select="/nf:news_flash/nf:title"/>
|
||||
</xsl:element>
|
||||
</td>
|
||||
<td valign="right">
|
||||
<xsl:value-of select="/nf:news_flash/nf:launch_date"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<xsl:variable name="body" select="/nf:news_flash/nf:body"/>
|
||||
<xsl:value-of select="substring-before($body,'</p>')" disable-output-escaping="yes"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:nf="http://www.alfresco.org/alfresco/nf"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:text disable-output-escaping="yes"><%String channel = (String) request.getParameter("channel");%></xsl:text>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">/views/pages/details.jsp?channel=<%=channel%>&amp;content=/content/news-flash/<xsl:value-of select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '.html')"/>&amp;title=<xsl:value-of select="/nf:news_flash/nf:title"/></xsl:attribute>
|
||||
<xsl:value-of select="/nf:news_flash/nf:title"/>
|
||||
</xsl:element>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:nf="http://www.alfresco.org/alfresco/nf"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/nf"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- defines the form for creating a navigation hierarchy -->
|
||||
<xs:element name="news_flash">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="body" type="xs:string"/>
|
||||
<xs:element name="launch_date" type="xs:date" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:nf="http://www.alfresco.org/alfresco/nf"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="/nf:news_flash/nf:title"/>
|
||||
</td>
|
||||
<td valign="right">
|
||||
<xsl:value-of select="/nf:news_flash/nf:launch_date"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<xsl:value-of select="/nf:news_flash/nf:body" disable-output-escaping="yes"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:potd="http://www.alfresco.org/alfresco/potd"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/potd"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- dynamically loads the company footer choices simple type -->
|
||||
<xs:include schemaLocation="/views/components/channel-list.jsp"/>
|
||||
|
||||
<!-- defines the form for creating a press release -->
|
||||
<xs:element name="potd">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="picture" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="channel" type="potd:channel_choices"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:potd="http://www.alfresco.org/alfresco/potd"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/potd:potd">
|
||||
<xsl:for-each select="potd:picture">
|
||||
potd_images[<xsl:value-of select="position()"/>] = new Image();
|
||||
potd_images[<xsl:value-of select="position()"/>].src ='<xsl:value-of select="."/>';
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:profile="http://www.alfresco.org/alfresco/profile"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/profile"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:simpleType name="name-prefix">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="Mr"/>
|
||||
<xs:enumeration value="Mrs"/>
|
||||
<xs:enumeration value="Ms"/>
|
||||
<xs:enumeration value="Miss"/>
|
||||
<xs:enumeration value="Dr"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="us-state">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="AL"/>
|
||||
<xs:enumeration value="AK"/>
|
||||
<xs:enumeration value="AZ"/>
|
||||
<xs:enumeration value="AR"/>
|
||||
<xs:enumeration value="CA"/>
|
||||
<xs:enumeration value="CO"/>
|
||||
<xs:enumeration value="CT"/>
|
||||
<xs:enumeration value="DC"/>
|
||||
<xs:enumeration value="DE"/>
|
||||
<xs:enumeration value="FL"/>
|
||||
<xs:enumeration value="GA"/>
|
||||
<xs:enumeration value="HI"/>
|
||||
<xs:enumeration value="ID"/>
|
||||
<xs:enumeration value="IL"/>
|
||||
<xs:enumeration value="IN"/>
|
||||
<xs:enumeration value="IA"/>
|
||||
<xs:enumeration value="KS"/>
|
||||
<xs:enumeration value="KY"/>
|
||||
<xs:enumeration value="LA"/>
|
||||
<xs:enumeration value="ME"/>
|
||||
<xs:enumeration value="MD"/>
|
||||
<xs:enumeration value="MA"/>
|
||||
<xs:enumeration value="MI"/>
|
||||
<xs:enumeration value="MN"/>
|
||||
<xs:enumeration value="MS"/>
|
||||
<xs:enumeration value="MO"/>
|
||||
<xs:enumeration value="MT"/>
|
||||
<xs:enumeration value="NE"/>
|
||||
<xs:enumeration value="NV"/>
|
||||
<xs:enumeration value="NH"/>
|
||||
<xs:enumeration value="NJ"/>
|
||||
<xs:enumeration value="NM"/>
|
||||
<xs:enumeration value="NY"/>
|
||||
<xs:enumeration value="NC"/>
|
||||
<xs:enumeration value="ND"/>
|
||||
<xs:enumeration value="OH"/>
|
||||
<xs:enumeration value="OK"/>
|
||||
<xs:enumeration value="OR"/>
|
||||
<xs:enumeration value="PA"/>
|
||||
<xs:enumeration value="RI"/>
|
||||
<xs:enumeration value="SC"/>
|
||||
<xs:enumeration value="SD"/>
|
||||
<xs:enumeration value="TN"/>
|
||||
<xs:enumeration value="TX"/>
|
||||
<xs:enumeration value="UT"/>
|
||||
<xs:enumeration value="VT"/>
|
||||
<xs:enumeration value="VA"/>
|
||||
<xs:enumeration value="WA"/>
|
||||
<xs:enumeration value="WV"/>
|
||||
<xs:enumeration value="WI"/>
|
||||
<xs:enumeration value="WY"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- defines the form for creating a profile -->
|
||||
<xs:element name="profile">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="name">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="prefix" type="profile:name-prefix" use="required">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="first" type="xs:normalizedString" use="required"/>
|
||||
<xs:attribute name="last" type="xs:normalizedString" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="address" minOccurs="1"
|
||||
maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="street" type="xs:normalizedString" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="city" type="xs:normalizedString"/>
|
||||
<xs:element name="state" type="profile:us-state"/>
|
||||
<xs:element name="zip">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:maxLength value="5"/>
|
||||
<xs:pattern value="[0-9][0-9][0-9][0-9][0-9]"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="picture" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="email" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="256"/>
|
||||
<xs:pattern value="[A-Z0-9._]+@[A-Z0-9.\-]+\.[A-Z]{2,4}"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:profile="http://www.alfresco.org/alfresco/profile"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" exclude-result-prefixes="xhtml">
|
||||
<xsl:output method="html" encoding="UTF-8" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:preserve-space elements="*"/>
|
||||
|
||||
<xsl:template match="/profile:profile">
|
||||
<table>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<xsl:if test="profile:picture">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="profile:picture"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="align">
|
||||
<xsl:text>left</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="width">
|
||||
<xsl:text>75</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:text>75</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<xsl:variable name="uid" select="fn:replaceAll(string($alf:form_instance_data_file_name), '.xml', '')"/>
|
||||
<xsl:element name="div">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="$uid"/>
|
||||
</xsl:attribute>
|
||||
<b><xsl:value-of select="profile:name/@prefix"/>. <xsl:value-of select="profile:name/@first"/><xsl:text> </xsl:text><xsl:value-of select="profile:name/@last"/></b>
|
||||
<br/>
|
||||
<xsl:for-each select="profile:address">
|
||||
<xsl:for-each select="profile:street">
|
||||
<xsl:value-of select="."/><br/>
|
||||
</xsl:for-each>
|
||||
<xsl:value-of select="profile:city"/><xsl:text> </xsl:text><xsl:value-of select="profile:state"/><xsl:text> </xsl:text><xsl:value-of select="profile:zip"/>
|
||||
<br/>
|
||||
</xsl:for-each>
|
||||
<xsl:value-of select="profile:email"/>
|
||||
</xsl:element>
|
||||
<br/>
|
||||
<xsl:variable name="street">
|
||||
<xsl:for-each select="/profile:profile/profile:address/profile:street">
|
||||
<xsl:value-of select="concat(concat(concat(./@Name,' '),.),' ')" />
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="address" select="concat($street,' ',/profile:profile/profile:address/profile:city,' ',/profile:profile/profile:address/profile:state,' ',/profile:profile/profile:address/profile:zip)"/>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">#</xsl:attribute>
|
||||
<xsl:attribute name="onClick">addGeocode('<xsl:value-of select="normalize-space($address)"/>','<xsl:value-of select="$uid"/>');</xsl:attribute>
|
||||
Show Address
|
||||
</xsl:element>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:sc="http://www.alfresco.org/alfresco/sc"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/sc"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:complexType name="variable">
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:normalizedString"/>
|
||||
<xs:element name="value" type="xs:anyURI"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:element name="site-configuration">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="configration-variable" type="sc:variable" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
62
source/test-resources/xforms/tests/bugs/ETHREEOH-1046.xsd
Normal file
62
source/test-resources/xforms/tests/bugs/ETHREEOH-1046.xsd
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tx="http://www.alfresco.org/alfresco/tx"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/tx"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- Department -->
|
||||
<xs:simpleType name="department">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="HHMI Company-wide"/>
|
||||
<xs:enumeration value="Accounts Payable"/>
|
||||
<xs:enumeration value="Application Security"/>
|
||||
<xs:enumeration value="Business Systems Support"/>
|
||||
<xs:enumeration value="Communications"/>
|
||||
<xs:enumeration value="Facilities"/>
|
||||
<xs:enumeration value="Finance"/>
|
||||
<xs:enumeration value="General Counsel"/>
|
||||
<xs:enumeration value="Grants and Special Programs"/>
|
||||
<xs:enumeration value="Human Resources"/>
|
||||
<xs:enumeration value="Information Technology"/>
|
||||
<xs:enumeration value="Internal Audit"/>
|
||||
<xs:enumeration value="Investments"/>
|
||||
<xs:enumeration value="Library"/>
|
||||
<xs:enumeration value="Meeting Services"/>
|
||||
<xs:enumeration value="Purchasing"/>
|
||||
<xs:enumeration value="Records & Archives"/>
|
||||
<xs:enumeration value="Science"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- Category -->
|
||||
<xs:simpleType name="category">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="About"/>
|
||||
<xs:enumeration value="Announcement"/>
|
||||
<xs:enumeration value="Contact"/>
|
||||
<xs:enumeration value="Mission"/>
|
||||
<xs:enumeration value="News"/>
|
||||
<xs:enumeration value="Quick Links"/>
|
||||
<xs:enumeration value="Tech Tip"/>
|
||||
<xs:enumeration value="Upcoming Event"/>
|
||||
<xs:enumeration value="What's New"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- defines the form for creating a basic text-only content item -->
|
||||
<xs:element name="content">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="abstract" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="date_added" type="xs:date"/> <!-- How to put current date as default? -->
|
||||
<xs:element name="text" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="keywords" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="category" type="tx:category" minOccurs="1" maxOccurs="unbounded" default="News"/>
|
||||
<xs:element name="department" type="tx:department" default="HHMI Company-wide"/>
|
||||
<xs:element name="launch_date" type="xs:date" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="expiration_date" type="xs:date" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
67
source/test-resources/xforms/tests/bugs/ETHREEOH-1351.xsd
Normal file
67
source/test-resources/xforms/tests/bugs/ETHREEOH-1351.xsd
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- defines name prefix-->
|
||||
<xs:simpleType name="name-prefix">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value=""/>
|
||||
<xs:enumeration value="Mr"/>
|
||||
<xs:enumeration value="Mrs"/>
|
||||
<xs:enumeration value="Ms"/>
|
||||
<xs:enumeration value="Miss"/>
|
||||
<xs:enumeration value="Dr"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- defines the form for creating a user profile -->
|
||||
<xs:complexType name="user-profile">
|
||||
<xs:sequence>
|
||||
<xs:element name="name">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>default</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="prefix" type="article:name-prefix"/>
|
||||
<xs:element name="first" type="xs:normalizedString"/>
|
||||
<xs:element name="last" type="xs:normalizedString"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- defines the form for creating a user_profile -->
|
||||
<xs:element name="user_profile" type="article:user-profile" />
|
||||
|
||||
</xs:schema>
|
116
source/test-resources/xforms/tests/bugs/ETHREEOH-950.xsd
Normal file
116
source/test-resources/xforms/tests/bugs/ETHREEOH-950.xsd
Normal file
@@ -0,0 +1,116 @@
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:pr="http://www.discoverlosangeles.com/content"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
targetNamespace="http://www.discoverlosangeles.com/content"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:include schemaLocation="http://ec2-67-202-37-136.compute-1.amazonaws.com/tools/currentDate.jsp"/>
|
||||
|
||||
<xs:element name="content_article">
|
||||
<xs:complexType>
|
||||
|
||||
<xs:sequence>
|
||||
|
||||
<xs:element name="title" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||
|
||||
<xs:element name="sub_title_or_meta_description" minOccurs="1" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:maxLength value="160"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="meta_keywords" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
|
||||
<xs:element name="headline_image">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="image" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:label>Image path</alf:label>
|
||||
<alf:alert>An image is required to create content</alf:alert>
|
||||
<alf:appearance>image_file_picker</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="caption" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="credits" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="paragraph" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="heading" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="content" type="xs:string" minOccurs="1" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>full</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
|
||||
</xs:element>
|
||||
<xs:element name="photo" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="image" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:label>Image path</alf:label>
|
||||
<alf:alert>An image is required to create content</alf:alert>
|
||||
<alf:appearance>image_file_picker</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="caption" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="credits" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="google_map" minOccurs="0"
|
||||
maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="aptify_id" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="address" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="longitude" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="latitude" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="launch_date" type="pr:current_date" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="expiration_date" type="xs:date" minOccurs="0" maxOccurs="1" default="2100-01-01"/>
|
||||
|
||||
<xs:element name="show_as_promoted_on_homepage" type="xs:boolean" default="false"/>
|
||||
<xs:element name="show_on_homepage" type="xs:boolean" default="false"/>
|
||||
|
||||
<xs:element name="show_as_promoted_on_section_homepage" type="xs:boolean" default="false"/>
|
||||
<xs:element name="show_on_section_homepage" type="xs:boolean" default="false"/>
|
||||
|
||||
<xs:element name="promotional_components">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="contest" type="xs:boolean" default="true"/>
|
||||
<xs:element name="newsletter" type="xs:boolean" default="true"/>
|
||||
<xs:element name="video_or_photo" type="xs:boolean" default="true"/>
|
||||
<xs:element name="map" type="xs:boolean" default="true"/>
|
||||
<xs:element name="top_ten" type="xs:boolean" default="true"/>
|
||||
<xs:element name="business_newsletter" type="xs:boolean" default="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
121
source/test-resources/xforms/tests/bugs/ETWOTWO-71.xsd
Normal file
121
source/test-resources/xforms/tests/bugs/ETWOTWO-71.xsd
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema attributeFormDefault="unqualified"
|
||||
elementFormDefault="qualified"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
xmlns:mitaa="http://alum.mit.edu/"
|
||||
targetNamespace="http://alum.mit.edu/">
|
||||
<xs:element name="page">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="1" maxOccurs="1" name="content">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
||||
<!-- Main Body Content -->
|
||||
<xs:element minOccurs="1" maxOccurs="1" name="main_body_content">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element type="xs:anyURI" name="main_image" default="/images/learn"/>
|
||||
<xs:element type="xs:normalizedString" name="main_image_caption" />
|
||||
<xs:element type="xs:normalizedString" name="main_image_alt_text" />
|
||||
|
||||
<xs:element type="xs:normalizedString" name="headline" />
|
||||
<xs:element type="xs:string" name="teaser_text">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element type="xs:anyURI" name="read_more_URL" />
|
||||
|
||||
<!--Related Links -->
|
||||
<xs:element minOccurs="0" maxOccurs="2" name="related_links">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="link_title" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="link_URL" type="xs:anyURI" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- Featured Learning 1 -->
|
||||
<xs:element minOccurs="1" maxOccurs="1" name="featured_learning_one">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element type="xs:anyURI" name="image" default="/images/learn"/>
|
||||
<xs:element type="xs:normalizedString" name="image_alt_text" />
|
||||
<xs:element type="xs:normalizedString" name="link_text" />
|
||||
<xs:element type="xs:anyURI" name="link_URL" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- Featured Learning 2 -->
|
||||
<xs:element minOccurs="1" maxOccurs="1" name="featured_learning_two">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element type="xs:anyURI" name="image" default="/images/learn"/>
|
||||
<xs:element type="xs:normalizedString" name="image_alt_text" />
|
||||
<xs:element type="xs:normalizedString" name="link_text" />
|
||||
<xs:element type="xs:anyURI" name="link_URL" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- Featured Learning 3 -->
|
||||
<xs:element minOccurs="1" maxOccurs="3" name="featured_learning_three">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element type="xs:anyURI" name="image" default="/images/learn"/>
|
||||
<xs:element type="xs:normalizedString" name="image_alt_text" />
|
||||
<xs:element type="xs:normalizedString" name="link_text" />
|
||||
<xs:element type="xs:anyURI" name="link_URL" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- NOTE TO ALFRESCO ENGINEER: Notice that the module below behaves as expected, and allows a user to input a minimum of 0 modules and an unbounded maximum number of modules. -->
|
||||
<!--See Also Module -->
|
||||
<xs:element minOccurs="0" maxOccurs="unbounded" name="see_also">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="link_title" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="link_URL" type="xs:anyURI" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- NOTE TO ALFRESCO ENGINEER: Also notice that when the maximum cardinality is set to 1 the alfresco forms processor requires the user to enter at least one instance of the module, and it is therefore no longer optional. -->
|
||||
<!-- Discussion Network module -->
|
||||
<xs:element minOccurs="0" maxOccurs="1" nillable="true" name="featured_discussion">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="discussion" type="xs:normalizedString" minOccurs="1" maxOccurs="1" nillable="true"/>
|
||||
<xs:element name="discussion_URL" type="xs:anyURI" minOccurs="1" maxOccurs="1" nillable="true"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- Contextual Giving Module -->
|
||||
<xs:element minOccurs="0" maxOccurs="1" nillable="true" name="contextual_giving">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" minOccurs="1" maxOccurs="1" nillable="true"/>
|
||||
<xs:element name="body_text" type="xs:string" minOccurs="1" maxOccurs="1" nillable="true">
|
||||
<xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="giving_URL" type="xs:anyURI" minOccurs="1" maxOccurs="1" nillable="true"/>
|
||||
<xs:element name="optional_image" type="xs:anyURI" minOccurs="0" maxOccurs="2" nillable="true" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
439
source/test-resources/xforms/tests/bugs/ETWOTWO-868.xsd
Normal file
439
source/test-resources/xforms/tests/bugs/ETWOTWO-868.xsd
Normal file
@@ -0,0 +1,439 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:article="http://www.alfresco.org/alfresco/article"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- defines name prefix-->
|
||||
<xs:simpleType name="name-prefix">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="Mr"/>
|
||||
<xs:enumeration value="Mrs"/>
|
||||
<xs:enumeration value="Ms"/>
|
||||
<xs:enumeration value="Miss"/>
|
||||
<xs:enumeration value="Dr"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- defines state list-->
|
||||
<xs:simpleType name="us-state">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="AL">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Alabama</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="AK">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Alaska</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="AZ">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Arizona</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="AR">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Arkansas</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="CA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>California</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="CO">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Colorado</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="CT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Connecticut</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DC">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>District of Columbia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="DE">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Delaware</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="FL">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Florida</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="GA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Georgia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="HI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Hawaii</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ID">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Idaho</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="IL">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Illinois</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="IN">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Indiana</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="IA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Iowa</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="KS">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Kansas</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="KY">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Kentucky</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="LA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Louisiana</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ME">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Maine</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MD">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Maryland</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Massachusetts</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Michigan</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MN">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Minnesota</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MS">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Mississippi</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MO">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Missouri</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="MT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Montana</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NE">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Nebraska</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NV">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Nevada</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NH">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New Hampshire</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NJ">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New Jersey</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NM">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New Mexico</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NY">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>New York</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="NC">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>North Carolina</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="ND">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>North Dakota</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="OH">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Ohio</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="OK">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Oklahoma</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="OR">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Oregon</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="PA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Pennsylvania</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="RI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Rhode Island</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SC">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>South Carolina</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="SD">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>South Dakota</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="TN">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Tennessee</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="TX">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Texas</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="UT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Utah</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="VT">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Vermont</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="VA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Virginia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WA">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Washington</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WV">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>West Virginia</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WI">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Wisconsin</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
<xs:enumeration value="WY">
|
||||
<xs:annotation>
|
||||
<xs:appinfo><alf:label>Wyoming</alf:label></xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:enumeration>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- defines the form for creating a user profile -->
|
||||
<xs:complexType name="user-profile">
|
||||
<xs:sequence>
|
||||
<xs:element name="name">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>minimal</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="prefix" type="article:name-prefix"/>
|
||||
<xs:element name="first" type="xs:normalizedString"/>
|
||||
<xs:element name="last" type="xs:normalizedString"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="address" minOccurs="0"
|
||||
maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="street" type="xs:normalizedString" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="city" type="xs:normalizedString"/>
|
||||
<xs:element name="state" type="article:us-state"/>
|
||||
<xs:element name="zip">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:alert>The value entered is not a valid zip code.</alf:alert>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:maxLength value="5"/>
|
||||
<xs:pattern value="[0-9][0-9][0-9][0-9][0-9]"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="picture" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="bio" type="xs:string"/>
|
||||
<xs:element name="email" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:alert>The value entered is not a valid email address.</alf:alert>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:maxLength value="256"/>
|
||||
<xs:pattern value="[A-Za-z0-9._]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,4}"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="article-picture">
|
||||
<xs:sequence>
|
||||
<xs:element name="image" type="xs:anyURI" minOccurs="0" maxOccurs="1" default="/content/article/photos">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>image_file_picker</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="caption" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="article-page">
|
||||
<xs:sequence>
|
||||
<xs:element name="page_title" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="page_body" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>full</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="page_picture" type="article:article-picture" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="related-item">
|
||||
<xs:sequence>
|
||||
<xs:element name="item_label" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="item_link" type="xs:anyURI" minOccurs="0" maxOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>search_restricted_file_picker</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- defines the form for creating a user_profile -->
|
||||
<xs:element name="user_profile" type="article:user-profile" />
|
||||
|
||||
<!-- defines the form for creating a news flash -->
|
||||
<xs:element name="news_flash">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="location" type="xs:normalizedString"/>
|
||||
<xs:element name="date" type="xs:date" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="body" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:appearance>full</alf:appearance>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- defines the form for creating a full article -->
|
||||
<xs:element name="article">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="author" type="article:user-profile" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="location" type="xs:normalizedString"/>
|
||||
<xs:element name="date" type="xs:date" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="teaser" type="xs:string"/>
|
||||
<xs:element name="tag" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="page" type="article:article-page" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="related" type="article:related-item" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
51
source/test-resources/xforms/tests/bugs/ETWOTWO-879.xsd
Normal file
51
source/test-resources/xforms/tests/bugs/ETWOTWO-879.xsd
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:fraction="http://www.alfresco.org/alfresco/fraction"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/fraction"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- defines the form for creating a full article -->
|
||||
<xs:element name="fraction">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="title" type="xs:normalizedString" />
|
||||
<xs:element name="popularity" minOccurs="0" maxOccurs="1" default="3">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="2"/>
|
||||
<xs:fractionDigits value="1"/>
|
||||
<xs:minInclusive value="0.0"/>
|
||||
<xs:maxInclusive value="5.0"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
BIN
source/test-resources/xforms/tests/bugs/ETWOTWO-932.xsd
Normal file
BIN
source/test-resources/xforms/tests/bugs/ETWOTWO-932.xsd
Normal file
Binary file not shown.
37
source/test-resources/xforms/tests/bugs/ETWOTWO-950.xsd
Normal file
37
source/test-resources/xforms/tests/bugs/ETWOTWO-950.xsd
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:wftest="http://www.alfresco.org/alfresco/wftest"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/wftest"
|
||||
xmlns:alf="http://www.alfresco.org" elementFormDefault="qualified">
|
||||
|
||||
<xsd:simpleType name="contenttypevalueslist">
|
||||
<xsd:list itemType="wftest:contenttype-list" ></xsd:list>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="contenttype-list">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="alfresco">
|
||||
<xsd:annotation>
|
||||
<xsd:appinfo><alf:label>Test Item</alf:label></xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:element name="wftest">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="contentType"
|
||||
type="wftest:contenttypevalueslist">
|
||||
<xsd:annotation>
|
||||
<xsd:appinfo>
|
||||
<alf:label>Content Type</alf:label>
|
||||
<alf:appearance>full</alf:appearance>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
21
source/test-resources/xforms/tests/bugs/datebug.xsd
Normal file
21
source/test-resources/xforms/tests/bugs/datebug.xsd
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:pr="http://www.example.lk/Date_Bug"
|
||||
targetNamespace="http://www.example.lk/Date_Bug"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:element name="Date_Bug" type="pr:Bug"/>
|
||||
|
||||
<xs:complexType name="Bug">
|
||||
<xs:sequence>
|
||||
<xs:element name="Test_Field_1" type="xs:normalizedString"/>
|
||||
<xs:element name="Test_Field_2" type="xs:normalizedString"/>
|
||||
<xs:element name="Date" type="xs:date"/>
|
||||
<!--Only the label of the Date element can be viewed when the created XML needs to be edited-->
|
||||
<xs:element name="Test_Field_3" type="xs:normalizedString"/>
|
||||
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
|
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:ar="http://www.alfresco.org/alfresco/article"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/article"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- Simple types -->
|
||||
<xs:simpleType name="NonEmptyNormalizedStringType">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- Complex types -->
|
||||
<xs:complexType abstract="true" name="CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Title" type="ar:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Summary" type="ar:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Keyword" type="ar:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="PublishDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="ExpiryDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="ArticleType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="ar:CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Body" type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Image" type="xs:anyURI" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
<!-- Root Element -->
|
||||
<xs:element name="Article" type="ar:ArticleType">
|
||||
<xs:unique name="UniqueKeyword">
|
||||
<xs:selector xpath="ar:Keyword" />
|
||||
<xs:field xpath="." />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:ar="http://www.alfresco.org/alfresco/article"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
exclude-result-prefixes="xhtml">
|
||||
|
||||
<xsl:output method="html"
|
||||
encoding="UTF-8"
|
||||
indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
|
||||
|
||||
<xsl:preserve-space elements="*" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="/ar:Article/ar:Title" disable-output-escaping="yes" />
|
||||
</title>
|
||||
<xsl:if test="/ar:Article/ar:Summary">
|
||||
<meta name="description" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/ar:Article/ar:Summary" />
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
<xsl:if test="/ar:Article/ar:Keyword">
|
||||
<meta name="keyword" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:for-each select="/ar:Article/ar:Keyword">
|
||||
<xsl:value-of select="normalize-space(.)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() != last()">,</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
</head>
|
||||
<body>
|
||||
<h1><xsl:value-of select="/ar:Article/ar:Title" disable-output-escaping="yes" /></h1>
|
||||
<p><xsl:value-of select="/ar:Article/ar:Body" disable-output-escaping="yes" /></p>
|
||||
<xsl:if test="/ar:Article/ar:Image">
|
||||
<img>
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="/ar:Article/ar:Image" disable-output-escaping="yes" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</xsl:if>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:hb="http://www.alfresco.org/alfresco/htmlblock"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/htmlblock"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:simpleType name="ColorType">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:enumeration value="Red"/>
|
||||
<xs:enumeration value="Blue"/>
|
||||
<xs:enumeration value="Green"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- Simple types -->
|
||||
<xs:simpleType name="NonEmptyNormalizedStringType">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- Complex types -->
|
||||
<xs:complexType abstract="true" name="CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Title" type="hb:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Summary" type="hb:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Keyword" type="hb:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="unbounded" />
|
||||
<!--
|
||||
<xs:element name="PublishDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="ExpiryDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
-->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="HtmlBlockType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="hb:CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Body" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
<!-- Root Element -->
|
||||
<xs:element name="HtmlBlock" type="hb:HtmlBlockType">
|
||||
<xs:unique name="UniqueKeyword">
|
||||
<xs:selector xpath="hb:Keyword" />
|
||||
<xs:field xpath="." />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:hb="http://www.alfresco.org/alfresco/htmlblock"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/htmlblock"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<!-- Simple types -->
|
||||
<xs:simpleType name="NonEmptyNormalizedStringType">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- Complex types -->
|
||||
<xs:complexType abstract="true" name="CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Title" type="hb:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Summary" type="hb:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Keyword" type="hb:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="unbounded" />
|
||||
<!--
|
||||
<xs:element name="PublishDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="ExpiryDate" type="xs:date" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
-->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="HtmlBlockType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="hb:CommonPropertiesType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Body" type="xs:string" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
<!-- Root Element -->
|
||||
<xs:element name="HtmlBlock" type="hb:HtmlBlockType">
|
||||
<xs:unique name="UniqueKeyword">
|
||||
<xs:selector xpath="hb:Keyword" />
|
||||
<xs:field xpath="." />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:hb="http://www.alfresco.org/alfresco/htmlblock"
|
||||
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
|
||||
exclude-result-prefixes="xhtml">
|
||||
|
||||
<xsl:output method="html"
|
||||
encoding="UTF-8"
|
||||
indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
|
||||
|
||||
<xsl:preserve-space elements="*" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="/hb:HtmlBlock/hb:Title" disable-output-escaping="yes" />
|
||||
</title>
|
||||
<xsl:if test="/hb:HtmlBlock/hb:Summary">
|
||||
<meta name="description" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/hb:HtmlBlock/hb:Summary" />
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
<xsl:if test="/hb:HtmlBlock/hb:Keyword">
|
||||
<meta name="keyword" lang="en">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:for-each select="/hb:HtmlBlock/hb:Keyword">
|
||||
<xsl:value-of select="normalize-space(.)" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() != last()">,</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
</xsl:if>
|
||||
</head>
|
||||
<body>
|
||||
<h1><xsl:value-of select="/hb:HtmlBlock/hb:Title" disable-output-escaping="yes" /></h1>
|
||||
<p><xsl:value-of select="/hb:HtmlBlock/hb:Body" disable-output-escaping="yes" /></p>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user