This repository has been archived by the owner on Nov 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Add meta part to items and remove front requirement #14
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,61 @@ | ||||||||
<?xml version="1.0" encoding="UTF-8"?> | ||||||||
|
||||||||
<grammar ns="http://libero.pub" xmlns="http://relaxng.org/ns/structure/1.0"> | ||||||||
|
||||||||
<define name="libero.content.item.meta"> | ||||||||
|
||||||||
<element name="meta"> | ||||||||
<ref name="libero.content.item.meta.attributes"/> | ||||||||
<ref name="libero.content.item.meta.content"/> | ||||||||
</element> | ||||||||
|
||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.attributes"> | ||||||||
<empty/> | ||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.content"> | ||||||||
|
||||||||
<interleave> | ||||||||
<ref name="libero.content.item.meta.content.id"/> | ||||||||
<ref name="libero.content.item.meta.content.service"/> | ||||||||
</interleave> | ||||||||
|
||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.content.id"> | ||||||||
|
||||||||
<element name="id"> | ||||||||
<ref name="libero.content.item.meta.content.id.attributes"/> | ||||||||
<ref name="libero.content.item.meta.content.id.content"/> | ||||||||
</element> | ||||||||
|
||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.content.id.attributes"> | ||||||||
<empty/> | ||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.content.id.content"> | ||||||||
<ref name="libero.core.types.id"/> | ||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.content.service"> | ||||||||
|
||||||||
<element name="service"> | ||||||||
<ref name="libero.content.item.meta.content.service.attributes"/> | ||||||||
<ref name="libero.content.item.meta.content.service.content"/> | ||||||||
</element> | ||||||||
|
||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.content.service.attributes"> | ||||||||
<empty/> | ||||||||
</define> | ||||||||
|
||||||||
<define name="libero.content.item.meta.content.service.content"> | ||||||||
<ref name="libero.core.types.id"/> | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as schemas/api/content/item-ref.rng Lines 31 to 33 in 5b5340f
|
||||||||
</define> | ||||||||
|
||||||||
</grammar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="../basic.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<?xml-model href="../basic.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<?expected-error line="13" message="Duplicate part {http://libero.pub}front@xml:lang='en'" node="/libero:item/libero:front[2]"?> | ||
<?xml-model href="../extra-content.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<?xml-model href="../extra-content.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<?expected-error line="15" message="Duplicate part {http://libero.pub/test}content@xml:lang='en'" node="/libero:item/test:content[2]"?> | ||
|
||
<libero:item xmlns:libero="http://libero.pub"> | ||
<libero:item xmlns:libero="http://libero.pub" xmlns:test="http://libero.pub/test"> | ||
|
||
<libero:front xml:lang="en"> | ||
<libero:id>1234</libero:id> | ||
<libero:title>Title</libero:title> | ||
</libero:front> | ||
<test:content xml:lang="en"/> | ||
|
||
<libero:front xml:lang="en"> | ||
<libero:meta> | ||
<libero:id>1234</libero:id> | ||
thewilkybarkid marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<libero:title>Title</libero:title> | ||
</libero:front> | ||
<libero:service>foo</libero:service> | ||
</libero:meta> | ||
|
||
<test:content xml:lang="en"/> | ||
|
||
</libero:item> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="../basic.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<?xml-model href="../basic.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<?expected-error line="8" message="Did not expect element not-front there"?> | ||
<?expected-error line="8" message="Did not expect element not-meta there"?> | ||
|
||
<item xmlns="http://libero.pub"> | ||
<not-front xml:lang="en"> | ||
|
||
<not-meta> | ||
<id>1234</id> | ||
<title>Title</title> | ||
</not-front> | ||
<service>foo</service> | ||
</not-meta> | ||
|
||
</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="../basic.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<?xml-model href="../basic.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<?expected-error line="9" message="Title must not be empty" node="/libero:front/libero:title"?> | ||
<?expected-error line="8" message="Title must not be empty" node="/libero:front/libero:title"?> | ||
|
||
<libero:front xmlns:libero="http://libero.pub" xml:lang="en"> | ||
|
||
<libero:id>some-id</libero:id> | ||
<libero:title/> | ||
|
||
</libero:front> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="../basic.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<?xml-model href="../basic.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<?expected-error line="6" message="Expecting an element , got nothing"?> | ||
|
||
<front xmlns="http://libero.pub" xml:lang="en"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
<front xmlns="http://libero.pub"> | ||
|
||
<id>some-id</id> | ||
<title>Some Title</title> | ||
|
||
</front> |
3 changes: 1 addition & 2 deletions
3
tests/api/content/item/parts/front/invalid/whitespace-only-title.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
<back xmlns="http://libero.pub" xml:lang="en"> | ||
|
||
<id>some-id</id> | ||
<title>Some Title</title> | ||
|
||
</back> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
<front xmlns="http://libero.pub" xml:lang="en"> | ||
|
||
<id>some-id</id> | ||
<title>Some Title</title> | ||
|
||
</front> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<grammar ns="http://libero.pub/test" xmlns="http://relaxng.org/ns/structure/1.0"> | ||
|
||
<include href="../../../../../test-case.rng"/> | ||
|
||
<include href="../../../../../../api/content/parts/meta.rng"/> | ||
|
||
<start> | ||
<ref name="libero.content.item.meta"/> | ||
</start> | ||
|
||
</grammar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<grammar ns="http://libero.pub/test" xmlns="http://relaxng.org/ns/structure/1.0"> | ||
|
||
<include href="../../../../../test-case.rng"/> | ||
|
||
<include href="../../../../../../api/content/parts/meta.rng"/> | ||
|
||
<start> | ||
<ref name="libero.content.item.meta"/> | ||
</start> | ||
|
||
<define name="libero.content.item.meta.attributes" combine="interleave"> | ||
|
||
<attribute name="key" ns="http://libero.pub/test"> | ||
<text/> | ||
</attribute> | ||
|
||
</define> | ||
|
||
</grammar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<grammar ns="http://libero.pub/test" xmlns="http://relaxng.org/ns/structure/1.0"> | ||
|
||
<include href="../../../../../test-case.rng"/> | ||
|
||
<include href="../../../../../../api/content/parts/meta.rng"/> | ||
|
||
<start> | ||
<ref name="libero.content.item.meta"/> | ||
</start> | ||
|
||
<define name="libero.content.item.meta.content" combine="interleave"> | ||
|
||
<element name="content"> | ||
<empty/> | ||
</element> | ||
|
||
</define> | ||
|
||
</grammar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="../basic.rng" schematypens="http://relaxng.org/ns/structure/1.0"?> | ||
<?xml-model href="../basic.rng" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<?expected-error line="8" message="Expecting an element id, got nothing"?> | ||
<?expected-error line="8" message="Invalid sequence in interleave"?> | ||
<?expected-error line="8" message="Element meta failed to validate content"?> | ||
|
||
<meta xmlns="http://libero.pub"/> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oneOrMore
because of multiple languages I guess