private Using readUsing(final XMLStreamReader reader, final String schemaNamespace) throws XMLStreamException, EntityProviderException { reader.require(XMLStreamConstants.START_ELEMENT, edmNamespace, XmlMetadataConstants.EDM_USING); Using using = new Using(); using.setNamespace(reader.getAttributeValue(null, XmlMetadataConstants.EDM_SCHEMA_NAMESPACE)); inscopeMap.get(schemaNamespace).add(using.getNamespace()); using.setAlias(reader.getAttributeValue(null, XmlMetadataConstants.EDM_SCHEMA_ALIAS)); using.setAnnotationAttributes(readAnnotationAttribute(reader)); List<AnnotationElement> annotationElements = new ArrayList<AnnotationElement>(); while (reader.hasNext() && !(reader.isEndElement() && edmNamespace.equals(reader.getNamespaceURI()) && XmlMetadataConstants.EDM_USING.equals(reader.getLocalName()))) { reader.next(); if (reader.isStartElement()) { extractNamespaces(reader); currentHandledStartTagName = reader.getLocalName(); annotationElements.add(readAnnotationElement(reader)); } } if (!annotationElements.isEmpty()) { using.setAnnotationElements(annotationElements); } if (using.getAlias() != null) { aliasNamespaceMap.put(using.getAlias(), using.getNamespace()); } return using; }
for (Using using : usings) { xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_USING); xmlStreamWriter.writeAttribute("Namespace", using.getNamespace()); xmlStreamWriter.writeAttribute("Alias", using.getAlias()); writeAnnotationAttributes(using.getAnnotationAttributes(), predefinedNamespaces, null, xmlStreamWriter); writeDocumentation(using.getDocumentation(), predefinedNamespaces, xmlStreamWriter); writeAnnotationElements(using.getAnnotationElements(), predefinedNamespaces, xmlStreamWriter); xmlStreamWriter.writeEndElement();
<div id="HasControlls"> @Using(Html.BeginForm) { @Html.LabelFor(model => model.AuctionTypeId) @Html.DropDownList("AuctionTypeId", Model.AuctionTypes, @AuctionControllerResource.SelectAuctionType, new { id="auctionType", required = "required" }) @Html.ValidationMessageFor(model => model.AuctionTypeId) </div> </section> <section> @Html.LabelFor(model => model.AutomaticExtensionType, new { hidden = "true", id = "automaticExtensionTypeLabel" }) <div> @Html.DropDownList("AutomaticExtensionType", Model.AutomaticExtensions, @AuctionControllerResource.SelectAutomaticExtensionType, new { hidden="hidden", required = "required", id = "automaticExtensionTypeList" }) @Html.ValidationMessageFor(model => model.AutomaticExtensionType) </div> } <div id="HasNotControlls"> @Using(Html.BeginForm) { @Html.LabelFor(model => model.AuctionTypeId) @Html.DropDownList("AuctionTypeId", Model.AuctionTypes, @AuctionControllerResource.SelectAuctionType, new { id="auctionType", required = "required" }) @Html.ValidationMessageFor(model => model.AuctionTypeId) </div> </section> <section> @Html.ValidationMessageFor(model => model.AutomaticExtensionType) </div> </section> }
for (Using using : usings) { xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_USING); xmlStreamWriter.writeAttribute("Namespace", using.getNamespace()); xmlStreamWriter.writeAttribute("Alias", using.getAlias()); writeAnnotationAttributes(using.getAnnotationAttributes(), predefinedNamespaces, null, xmlStreamWriter); writeDocumentation(using.getDocumentation(), predefinedNamespaces, xmlStreamWriter); writeAnnotationElements(using.getAnnotationElements(), predefinedNamespaces, xmlStreamWriter); xmlStreamWriter.writeEndElement();
private Using readUsing(final XMLStreamReader reader, final String schemaNamespace) throws XMLStreamException, EntityProviderException { reader.require(XMLStreamConstants.START_ELEMENT, edmNamespace, XmlMetadataConstants.EDM_USING); Using using = new Using(); using.setNamespace(reader.getAttributeValue(null, XmlMetadataConstants.EDM_SCHEMA_NAMESPACE)); inscopeMap.get(schemaNamespace).add(using.getNamespace()); using.setAlias(reader.getAttributeValue(null, XmlMetadataConstants.EDM_SCHEMA_ALIAS)); using.setAnnotationAttributes(readAnnotationAttribute(reader)); List<AnnotationElement> annotationElements = new ArrayList<AnnotationElement>(); while (reader.hasNext() && !(reader.isEndElement() && edmNamespace.equals(reader.getNamespaceURI()) && XmlMetadataConstants.EDM_USING.equals(reader.getLocalName()))) { reader.next(); if (reader.isStartElement()) { extractNamespaces(reader); currentHandledStartTagName = reader.getLocalName(); annotationElements.add(readAnnotationElement(reader)); } } if (!annotationElements.isEmpty()) { using.setAnnotationElements(annotationElements); } if (using.getAlias() != null) { aliasNamespaceMap.put(using.getAlias(), using.getNamespace()); } return using; }
for (Using using : usings) { xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_USING); xmlStreamWriter.writeAttribute("Namespace", using.getNamespace()); xmlStreamWriter.writeAttribute("Alias", using.getAlias()); writeAnnotationAttributes(using.getAnnotationAttributes(), predefinedNamespaces, null, xmlStreamWriter); writeDocumentation(using.getDocumentation(), predefinedNamespaces, xmlStreamWriter); writeAnnotationElements(using.getAnnotationElements(), predefinedNamespaces, xmlStreamWriter); xmlStreamWriter.writeEndElement();
private Using readUsing(final XMLStreamReader reader, final String schemaNamespace) throws XMLStreamException, EntityProviderException { reader.require(XMLStreamConstants.START_ELEMENT, edmNamespace, XmlMetadataConstants.EDM_USING); Using using = new Using(); using.setNamespace(reader.getAttributeValue(null, XmlMetadataConstants.EDM_SCHEMA_NAMESPACE)); inscopeMap.get(schemaNamespace).add(using.getNamespace()); using.setAlias(reader.getAttributeValue(null, XmlMetadataConstants.EDM_SCHEMA_ALIAS)); using.setAnnotationAttributes(readAnnotationAttribute(reader)); List<AnnotationElement> annotationElements = new ArrayList<AnnotationElement>(); while (reader.hasNext() && !(reader.isEndElement() && edmNamespace.equals(reader.getNamespaceURI()) && XmlMetadataConstants.EDM_USING.equals(reader.getLocalName()))) { reader.next(); if (reader.isStartElement()) { extractNamespaces(reader); currentHandledStartTagName = reader.getLocalName(); annotationElements.add(readAnnotationElement(reader)); } } if (!annotationElements.isEmpty()) { using.setAnnotationElements(annotationElements); } if (using.getAlias() != null) { aliasNamespaceMap.put(using.getAlias(), using.getNamespace()); } return using; }