Skip to content

Commit

Permalink
better handling of (qualified/unqualified ns)
Browse files Browse the repository at this point in the history
  • Loading branch information
goetas committed Sep 1, 2016
1 parent 9a29bdf commit f5763c5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 34 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,4 @@ foreach ($schema->getAttributes() as $attr){
foreach ($schema->getAttributeGroups() as $attrGroup){

}


```

Note
----

I'm sorry for the *terrible* english fluency used inside the documentation, I'm trying to improve it.
Pull Requests are welcome.
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"php" : ">=5.4.0"
},
"require-dev" : {
"phpunit/phpunit" : "^4.8|^5.0",
"sami/sami" : "^2.0"
"phpunit/phpunit" : "^4.8|^5.0"
},
"autoload" : {
"psr-4" : {
Expand All @@ -33,7 +32,7 @@
},
"extra" : {
"branch-alias" : {
"dev-master" : "0.1-dev"
"dev-master" : "0.2-dev"
}
}
}
}
18 changes: 0 additions & 18 deletions sami.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Schema/Element/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Element extends Item implements ElementItem, ElementSingle

protected $max = 1;

protected $qualified = true;
protected $qualified = false;

protected $nil = false;

Expand Down
2 changes: 1 addition & 1 deletion src/Schema/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Schema
{

protected $elementsQualification = true;
protected $elementsQualification = false;

protected $attributesQualification = false;

Expand Down
4 changes: 2 additions & 2 deletions src/SchemaReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ private function schemaNode(Schema $schema, DOMElement $node, Schema $parent = n
} elseif ($parent) {
$schema->setTargetNamespace($parent->getTargetNamespace());
}
$schema->setElementsQualification(!$node->hasAttribute("elementFormDefault") || $node->getAttribute("elementFormDefault") == "qualified");
$schema->setAttributesQualification(!$node->hasAttribute("attributeFormDefault") || $node->getAttribute("attributeFormDefault") == "qualified");
$schema->setElementsQualification($node->getAttribute("elementFormDefault") == "qualified");
$schema->setAttributesQualification($node->getAttribute("attributeFormDefault") == "qualified");
$schema->setDoc($this->getDocumentation($node));
$functions = array();

Expand Down

0 comments on commit f5763c5

Please sign in to comment.